I'm pulling a list of pages from a PublishingWeb like so
...
PublishingWeb pubWeb = PublishingWeb.GetPublishingWeb(elevatedWeb);
foreach (PublishingPage page in pubWeb.GetPublishingPages())
{
...
}
...
By using a PublishingPage I can get the page Title, Description, CreatedDate easily but it sorts on CreatedDate ascending (I need descending, but would ultimately prefer using the default view to determine order)
Is there anyway to pull the DefaultView of the PublishingPages? I realize these are two different things since Views relate to an SPList and not a PublishingPage.
I can pull in the list instead with something like
SPList pages = web.Lists["Pages"];
foreach (SPListItem page in pages.GetItems(pages.DefaultView))
{
...
}
However, in this case the Title and CreatedDate fields are empty, if I dig deeper in the properties I can get to vti_title but feels like I've lost my way digging that far.
web.GetList("/MyWeb/Lists/Pages")instead ofweb.Lists["Pages"]patil-rajesh.blogspot.com/2011/04/… – rjcup3 Nov 20 '12 at 18:14