Tuesday, July 2, 2013

#SharePoint Set Welcome Page


To set SharePoint default page for a site, do one of the following:

- Go to Site Actions, Site Setting, Welcome Page (under Look and Feel)

- Navigate directly to /_Layouts/AreaWelcomePage.aspx (will throw "Pages Document Library Missing" error if Publishing is disabled)

- Go to the page you want to use as home, click "Page" on the ribbon and then click "Make Homepage" in "Page Actions"

- Use PowerShell
SPContext.Current.Web.AllowUnsafeUpdates = true;
SPFolder objFolder = SPContext.Current.Web.RootFolder;
objFolder.WelcomePage = "Shared%20Documents/Forms/AllItems.aspx";
objFolder.Update();
SPContext.Current.Web.AllowUnsafeUpdates = false;

No comments:

Post a Comment