Add Custom Master Pages to your Site Collections as a feature
Step 1:
Navigate to the Features directory on your web server:
c:\Program Files\Common Files\Microsoft Shared\web server extensions\
c:\Program Files\Common Files\Microsoft Shared\web server extensions\
12\TEMPLATE\FEATURES
Step 2:
Locate the PublishingLayouts Feature directory.
Copy this folder and paste it at the root of Features.
Rename the folder to a unique name of your choice.
For my example I used KMMasterPages.
Step 3:
Inside MasterPages folder delete all default master pages or keep one which you want to modify.
I have created a new master page “ KMB.master”.
Step 4:
Next, open the ProvisionedFiles.xml file in Notepad or a similar editing application.
Delete all of the content and only keep the OSGMasterPages Module tag
And the PublishingLayoutsPreviewImages Module tag.
As opposed to listing out what to strip out, here is the code you need in this file(Copy and past)
:
Step 5:
Create a preview image in the language folder
(in this case, en-us).And paste following folders(if available)
Es-es, fr-fr, image, ja-jp, pt-br, pt-pt, zh-tw
Step 6:
There are four things need to edit in this file:
Change the Feature ID to a unique GUID,
You can generate GUIDs in Visual Studio (Tools - Create GUID - Registry Format - Copy).
Paste the new GUID for the ID and remove the curly brackets.
<Feature Id="FDFCD4C4-F0D9-43b5-8739-A33681049657"
<Feature Id="FDFCD4C4-F0D9-43b5-8739-A33681049657"
Update the title:
Title="Custom Master Pages"
Title="Custom Master Pages"
Update the description:
Description="Custom master pages for use across multiple site collections."
Description="Custom master pages for use across multiple site collections."
Change the Hidden state to False:
Hidden="False"
Hidden="False"
Step 7
You are now ready to install the new Feature on the web server.
Open a Command Prompt and enter the following:
Change directories to the BIN folder in the 12 hive so you can use STSADM.exe:
cd C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN
cd C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN
Launch STSADM and install the feature:
stsadm -o installfeature -name YourFeatureDirectoryName
stsadm -o installfeature -name YourFeatureDirectoryName
Step 8
Activate the feature from Site collection feature from site setting.
No comments:
Post a Comment