I wanted to create own customized My Site. By default My Sites is created on default.master page. Even though sharepoint admin try to change the default.master page, he found that it is not inherit from the Portal Home.
What is the best approach to customize?
You have to modify the default.aspx file in SPSPers to use Custom.Master page to get the My Profile view to use a single master page; it is not inherited from the Portal home. There are only 2 settings, default.master or custom.master.
You need to create a new master page and place it in the SPSPers directory and then modify the ONET.XML by adding a reference in the configuration to use your page
Step 1 – Create My Site Template
1. Create a My Site using any account
2. Make myMaster.master using default.master, which is located under _catalogs/masterpage
3. Customize U/I using copied master page
4. Copy this myMaster.master into C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\GLOBAL
Step 2 – Customize default.aspx
1. Change directory to C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\SiteTemplates\SPSPERS
2. Open default.aspx using Sharepoint Designer 2007
3. Change master page like shown below
From ‘MasterPageFile="~masterurl/default.master"’ to ‘MasterPageFile="~masterurl/custom.master" ‘
Step 3 – Customize ONET.XML
<Configuration ID="0" Name="Default" CustomMasterUrl="_catalogs/masterpage/myMaster.master">
Add a new module
<Module Name="CustomMasterPage" />
and in the modules section, add
<Module Name="CustomMasterPage" List="116" Url="_catalogs/masterpage" RootWebOnly="FALSE">
<File Url="MyMaster.master" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE" />
</Module>
Step 4 – Reset IIS
For the changes to take affect, you will need to reset the IIS.
example ONET.XML
<?xml version="1.0" encoding="utf-8" ?>
<Project Revision="3" SiteLogoUrl="/_layouts/images/mysite_titlegraphic.gif">
<NavBars>
</NavBars>
<ListTemplates>
</ListTemplates>
<DocumentTemplates>
</DocumentTemplates>
<Configurations>
<Configuration ID="-1" Name="NewWeb">
</Configuration>
<Configuration ID="0" Name="Default" CustomMasterUrl="_catalogs/masterpage/myMaster.master">
</Configuration>
<Configuration ID="1" Name="Blank">
<ExecuteUrl Url="_layouts/[%=System.Threading.Thread.CurrentThread.CurrentUICulture.LCID%]/settings.aspx" /> </Configurations>
<Modules>
<Module Name="Default" Url="" Path="">
</Module>
<Module Name="CustomMasterPage" List="116" Url="_catalogs/masterpage" RootWebOnly="FALSE" SetupPath="global">
<File Url="myMaster.master" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE" />
</Module>
</Modules>
</Project>
Posted
02-23-2007 9:12 PM
by
Unclaimed Blog