private static bool IsWelcomePage(string url)
{
bool rslt = false;
using (SPSite site = new SPSite(url))
{
using (SPWeb web = site.OpenWeb())
{
if (PublishingWeb.IsPublishingWeb(web))
{
PublishingWeb pweb = PublishingWeb.GetPublishingWeb(web);
string defaulturl = pweb.DefaultPage.Url;
if (defaulturl == new Uri(url).GetComponents(UriComponents.Path, UriFormat.SafeUnescaped))
{
rslt = true;
}
}
}
}
return rslt;
}
A place for me to store and share some notes about technical stuff I'm working with at the moment.
The views expressed on this blog are mine alone and do not necessarily reflect the views of my employer.
Friday, July 29, 2011
Getting the Welcome Page for a SharePoint Publishing Site
I wish I had found this sooner, it could have saved me a lot of time:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment