Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Custom Master Pages

  Asked By: Luke    Date: Jun 09    Category: Sharepoint    Views: 1808

I was wondering where a custom master page needs to be placed in order for
WSS 3.0 to be able to see it when creating a new site definition?



1 Answer Found

Answer #1    Answered By: Himanshu Gohil     Answered On: Jun 09

If you wish to add a custom  master page  as part of a site  definition you
need to do 4 things.

1) Change the MasterUrl and/or the CustomMasterUrl attributes of
the Configuration element in the site definition's ONET.xml. The
MasterURL path will be used to replace the ~MasterURL/default.master
token used in the Default.aspx @Page tag. This is the default for most
default.aspx site pages. The CustomMasterUrl will replace the token

2) Create a Module element with a File element to ghost the master
page from the site definition  directory in the 12 hive into the
masterpages gallery in the site. This goes in the Modules section of
the ONET.xml

3) Add a Module element to the Configuration section of the
ONET.XML to invoke the Module created in Step 2 when the site is

4) (optional) Change the MasterPage attribute in the @Page tag of
the default.aspx file in the root of the site definition to use the
CustomMasterURL token. It uses the MasterUrl token by default.

So the masterpage should go into the Masterpages gallery of the site and
the MasterUrl or CustomMasterUrl should be set to point at it.

Didn't find what you were looking for? Find more on Custom Master Pages Or get search suggestion and latest updates.