Skip Ribbon Commands
Skip to main content
Geetanjali > Posts > Missing Site Pages in Personal Site
May 27
Missing Site Pages in Personal Site

​Lately I faced and issue while working with Personal Sites. My requirement

was to deploy a page in personal sites everytime a personal site gets created.

So, the quick solution that came to my mind was to deploy it using feature

stapling, and everytime the personal site gets provisioned for somebody, the

feature will get activated and my page will get deployed to the SitePages

library in the personal site that gets created. To my utter surprise, there was

no SitePages library in my personal site though it was present in the MySite

host. Then I found out that "Wiki Page Home Page" feature , which

activates by default for Team Sites ,do not get activated by default for certain

site templates, including the personal sites. Therefore , personal sites do not

contain SitePages library by default. In-case we want to create SitePages

library in personal sites then in our feature activation we need to write the

following line of code that ensures creation of the SitePages library.

 

SPList list = web.Lists.EnsureSitePagesLibrary();

 

And thats it. This will create SitePages library for a non team site. :)

 

Cheers,

Geetanjali

Comments

There are no comments for this post.
 

 Related Posts

 
 

 Statistics

 
Views: 323
Comments: 0
Tags:SharePoint 2010, Personal Sites
Published:358 Days Ago