MOSS MAN

Paul Zanbaka

Customizing Sharepoint-Adding Template to Sharepoint Portal 2003

created by pzanbaka on Sunday, September 09, 2007 2:03 PM

How to add you own template to Sharepoint Portal Server. You first have to create a template, unfortunately we will not be discussing this in this article.
Once you have created the template make sure you save it as .stp extension.
For the sake of this example we will save it in here with the following name: C:\Templates\MyTemplate.stp
To add your template to the Portal Use the command line(Start|run|cmd)
cd [Drive]:\Program Files\Common Files\Microsoft Shared\web server extensions\60\BIN
Where [Drive]:\ is the drive Sharepoint is installed on.
stsadm.exe -o addtemplate -filename "C:\Templates\MyTemplate.stp" -title "My Template"
You must restart IIS for theconfigurations to kick in
Use the iisreset command, it is quick usually less than 30 seconds.

Now when you create a site in Sharepoint your template will be displayed after Sharepoint’s templates. Notiuce when you mouse over the built in templates a description is displayed on the bottom.
To add description to your template:
stsadm.exe -o addtemplate -filename "C:\Templates\MyTemplate.stp" -title "My Template" -description "This template is Greaat You must use it blah blah blah!"

To delete a template use this command
stsadm.exe -o deletetemplate -title "My Template"
Again, You must also restart IIS.
Now you are ready to add your template so go customize a sharepoint site and save the site a template and add it to the portal.

Filed under:

Comments

No Comments