Reading Pages Under a Site

Use the foll code snippet to read the pages under a site (Postings under a channel in CMS 2002 terminology):

if (PublishingWeb.IsPublishingWeb(web)){
PublishingWeb publishingWeb = PublishingWeb.GetPublishingWeb(web);
// Postings under this Channels
PublishingPageCollection pages = publishingWeb.GetPublishingPages();
foreach (PublishingPage page in pages)
{
//page.Name
//page.Title;
//page.Url;
}
}

Comments

Popular posts from this blog

Linksys Wireless Connection Failure

The security validation for this page is invalid. Click Back in your Web

Access Denied Host Header Sharepoint 2010 Windows Server 2008 R2