コード例 #1
0
        public List <TemplateDto> GetTemplates(bool advanced)
        {
            var scriptFileSetting = ActiveModule.OpenContentSettings().Template;
            var templates         = OpenContentUtils.ListOfTemplatesFiles(PortalSettings, ActiveModule.ModuleID, scriptFileSetting, App.Config.Opencontent, advanced);

            return(templates.Select(t => new TemplateDto()
            {
                Value = t.Value,
                Text = t.Text
            }).ToList());
        }
コード例 #2
0
        public List <TemplateDto> GetTemplates(int tabModuleId)
        {
            var dsModule   = (new ModuleController()).GetTabModule(tabModuleId);
            var dsSettings = dsModule.OpenContentSettings();
            var templates  = OpenContentUtils.ListOfTemplatesFiles(PortalSettings, ActiveModule.ModuleID, dsSettings.Template, App.Config.Opencontent, dsSettings.Template.MainTemplateUri());

            return(templates.Select(t => new TemplateDto()
            {
                Value = t.Value,
                Text = t.Text
            }).ToList());
        }