开发者

SharePoint - My Site - Customization (Layout)

I开发者_JAVA百科s there a way to customize the layout of the default page on the My Site?

I know you can deploy a feature to push files into the hive to deploy a custom theme and a custom CSS, but what about the layout--where and which webparts show up for the user by default?

These both talk about customizing the look and feel:

  • Customizing MOSS 2007 My Sites within the enterprise
  • Customizing the My Site look and feel

But is there a way to build webpart zones and surface dataviews for lists, save those and have those pages come up as the default for when their My Site is initialized?


Most of the sites referenced here tell you to use a feature which changes the masterpage, which holds all your webpart zones, where they're located and what webparts are in those zones. After you've created a MySite masterpage which has the look and feel you want, you need to deploy the feature to switch masterpages. In addition, you need to add a feature which staples the original feature (which changes the masterpage) to any new site that is created. Inside your staple feature, you can specify which site types you want to staple the feature to.

Here is a good article which doesn't require you to write code, but does require you to create both of the features and deploy them: http://www.sharepointblog.com/2008/07/sp2007-custom-master-pages-on-subsites.html

The area where you'll want to pick out which site type the feature to change the masterpage applies to (what site type the feature is "stapled" to) is:

FeatureSiteTemplateAssociation Id="bb77f112-2cda-4e92-b0ff-820c0216a7fe" TemplateName="STS#0"/> (this will staple it to the global template, any site created)

Here is a listing of the type of sites you can staple to: http://social.technet.microsoft.com/forums/en-US/sharepointgeneral/thread/721bec39-2d32-4bbc-9094-a021a0d06dcb

So, if you want to staple the feature to just MySites, you'd put this into your stapler feature:

FeatureSiteTemplateAssociation Id="bb77f112-2cda-4e92-b0ff-820c0216a7fe" TemplateName="SPSMSITE#0" />

You'll notice from the example that I posted a link to above, the stapler feature references the masterpage switching feature by the Id you supply in the FeatureSiteTemplateAssociation part of you stapling feature.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜