Page Ordering
Hi,
I am using the code,
var pages = App.WorkWith()
.Pages()
.Where(p => p.Parent != null)
.Where(p => p.Parent.Title == "Home")
.Where(p => p.ShowInNavigation == true)
.Get()
.ToList();
to list pages from database in Sitefinity4.1.I ordered the pages in the "Pages" page using up/down, and I want to load pages in that order .How can I make this possible ?
Hello Rakesh,
Have you tried using OrderBy:
var pages = App.WorkWith()
.Pages()
.Where(p => p.Parent != null)
.Where(p => p.Parent.Title == "Home")
.Where(p => p.ShowInNavigation == true)
.OrderBy(p => p.Ordinal)
.Get()
.ToList();