J
jread
Guest
You can query pages by page template id using this article: Query pages by template - Sitefinity CMS Pages Code: public class QueryPages_GetPagesByTemplate_NativeAPI { public static IQueryable GetPagesByTemplateNativeAPI(Guid templateId) { PageManager pageManager = PageManager.GetManager(); PageTemplate template = pageManager.GetTemplate(templateId); return template.Pages().Where(p => p.Status == ContentLifecycleStatus.Live); } } You can get the page template by title by following this article: Query page templates - Sitefinity CMS Frontend development Code: public static PageTemplate FindPageTemplateByTitle(string title) { PageManager pageManager = PageManager.GetManager(); PageTemplate template = pageManager.GetTemplates().Where(t => t.Title == title).FirstOrDefault(); return template; }
Continue reading...
Continue reading...