. Create a site definition
e. Log in to one of your front end web servers. Browse to the famous template directory. There is a folder called site templates. This folder contains many site definitions for team sites, meeting workspaces and publishing sites. This post will not describe how to redesign a publishing template. Many examples on the Internet already do. Just keep in mind that this post is about a non-publishing, basic team site.
f. The basic team site is located in the STS folder. We will create a new design and take this one as a starting point.
g. Create a copy of the existing sts site definition, in my case called SPEdmondsSchool
2. Add master page to site definition
a. There is no master page in this folder yet. We will take a copy of the default master page which is located in the GLOBAL folder and called default.master.
b. Next, create a copy of default.master and put it in the site definition folder SPEdmondsSchool. Rename the file (in our case called domestic.master)
c. Edit ONET.XML in your new site definition folder
d. For each configuration tag, add the following attributes: CustomMasterUrl="_catalogs/masterpage/ EdmondsSchool.master" MasterUrl="_catalogs/masterpage/EdmondsSchool.master"
e. Add a module where you provision the EdmondsSchool.master file to the _catalogs/master folder.
f. First you'll have to define your module (look at one example that is already there),
g. next you'll have to add the module to your configuration.
h. Open default.aspx from your site definition with notepad and change the masterURL property of the first line to: MasterPageFile="~masterurl/custom.master". Note: not EdmondsSchoolMaster but just custom.master. That is a predefined token which will resolve to EdmondsSchoolMaster
3. Add imagery
a.Put your custom imagery where you want, but I found it very convenient to put them in _layouts/1033/styles/ SPEdmondsSchool.
b. Because images from the stylesheet, master and page layout all use different relative paths and you cannot always use $SPURL:~sitecollection in all controls or HTML tags. Now you can use /_layouts/1033/styles/ SPEdmondsSchool / as a reference everywhere!
4. Add the template to the farm
a. Finally, create a new webtempXXX.xml file and specify your new template SPEdmondsSchool. Perhaps you'll need to IISReset your front end.
b. At this point you'll see a new site template on the site creation page. Try to create a new site using the new SPEdmondsSchool template.
5. Change master page and page layout
I would suggest making changes to your new master page and default.aspx located in the new SPEdmondsSchool folder. Changes are immediately visible on the site because the site is unghosted.
6. Package, deploy and store
Thursday, February 19, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment