Dotnetdreamer's Weblog

SharePoint, Silverlight and Azure

Posts Tagged ‘Custom Templates’

Custom Templates – Save Site as a Template

Posted by Ramprasad Navaneethakrishnan on May 9, 2009

In my last post, I explained all the out-of-the-box templates availalble in Sharepoint 2007.  In some cases (say a unique business requirement that needs a site template that doen’t fit in any of the one available out-of-the-box),  the templates available out-of-the-box, cannot be utilized right away. We might want to create a template that is customized to a requirement.

MOSS 2007 lets us create a site that is customized to our requirement and allow as to save and use that site as a template. How? Read further..

Now, I want to create a site template that will have the following elements. To make it very simple, I am having  just the following two elements.

  1. Document Library
  2. Picture Library

No available out-of-the-templates suites this requirement. Hence we build our own template

Creating Template Structure

  1. Go to Site Actions –> Create
  2. Select Site and Workspaces
  3. Give a title to the Site, enter the Url in the corresponding box.
  4. In the Select Templates, select Blank Template under the tab Collaboration
  5. Provide the administrator id and click Ok to create the Blank Site
  6. From the newly created Blank Site, go to Site Actions –> Create
  7. Selecte Document Library in the Libraries and Lists section.
  8. Give the name and decscription for the Docuemnt library and click Ok.
  9. Again goto Site Actions –> Create.
  10. Select Picture Libraries in the Libraries and Lists section.
  11. Enter the name and description for the Picture library. Click Ok.

Now we have created the structure for our template. The next step is creating a Template from this structure

Creating Template

  1. Go to Site Actions –> Site Settings
  2. Select Save as a Template from the section ‘ Look and Feel ‘.
  3. savesiteastemplate1
  4. savesiteastemplate2
  5. Enter the name for the template and the template file name. I am giving the name of  ‘TrainingTemplate’ for both template and the filename.
  6. Note the template file is has an extension of .stp.
  7. Give a short description for the template.
  8. Click Ok to create the template.

Once the template is created, it will be available in the Site templte gallery as shown below.

Now lets create a site based on the template we just created.

  1. Go to Site Actions –> Create
  2. Select Sites and Workspaces.
  3. Now you can see a Customtab in the templates section as shown below
  4. Select the Custom tab. This will show the template ‘TrainingTemplate’ we just created.
  5. Select the template, fill other required details like primary site administrator. Click Ok.
  6. Now the created site will have Document libraries and Picture libraries by default as shown below.

Hope this is useful.

Thanks.

Posted in MOSS 2007 | Tagged: , , , , , , , , , | Leave a Comment »