protected string GetSafePageFileName(PageDefinitionBase page)
        {
            var fileName = page.FileName;
            if (!fileName.EndsWith(".aspx")) fileName += ".aspx";

            return fileName;
        }
        protected string GetSafePageFileName(PageDefinitionBase page)
        {
            var fileName = page.FileName;
            if (!fileName.EndsWith("." + FileExtension)) fileName += "." + FileExtension;

            return fileName;
        }
Exemplo n.º 3
0
        protected SPListItem GetCurrentObject(SPFolder folder, PageDefinitionBase definition)
        {
            // TODO, CAML query
            var pageName = GetSafePageFileName(definition);

            foreach (SPFile file in folder.Files)
                if (file.Name.ToUpper() == pageName.ToUpper())
                    return file.Item;

            return null;
        }
Exemplo n.º 4
0
        protected string GetSafePageFileName(PageDefinitionBase pageModel)
        {
            var pageName = pageModel.FileName;

            if (!pageName.EndsWith(".master"))
                pageName += ".master";

            return pageName;
        }
Exemplo n.º 5
0
 protected abstract void MapProperties(object modelHost, ListItem item, PageDefinitionBase definition);
        protected SPListItem GetCurrentObject(SPFolder folder, PageDefinitionBase definition)
        {
            // TODO, CAML query
            var pageName = GetSafePageFileName(definition);

            return GetCurrentObjectByPageName(folder, pageName);
        }
        protected string GetSafePageFileName(PageDefinitionBase pageModel)
        {
            var pageName = pageModel.FileName;

            if (!pageName.ToLower().EndsWith(PageFileExtension.ToLower()))
                pageName += PageFileExtension.ToLower();

            return pageName;
        }
        protected string GetSafePageFileName(PageDefinitionBase page)
        {
            var fileName = page.FileName;

            if (!fileName.ToLower().EndsWith(PageFileExtension.ToLower()))
            {
                fileName += PageFileExtension;
            }

            return fileName;
        }