SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
A tip for performance: use web.GetList("/MyWeb/Lists/Pages") instead of web.Lists["Pages"]… – RJ Cuthbertson Nov 20 '12 at 18:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.