in

ASP.NET Weblogs

uber1024's WebLog

It's not hot wings and beer, but it's still okay

Creating Templates for Sharepoint Portal Server 2003

I figured this out the other day and wanted to document it somewhere.

To create a new template, go to the TEMPLATE/1033 directory. Make a copy of one of the SPS* directories and give it a name. For this example, I'll call it SPSTSITEMPLATE. I believe it needs an SPS* name. Then you have to go to the TEMPLATE/1033/XML directory. I made a copy of the WEBTEMPSPS.xml file and called it WEBTEMPSPSTSITEMPLATE.xml and then I took out everything between the "Templates" opeing tag and the "/Templates" closing tag and added the following lines:
       
<Templates xmlns:ows="Microsoft SharePoint"> 
<Template Name="SPSTSITEMPLATE" ID="10000">
   <Configuration ID="0" Title="TSI area template" Type="0" Hidden="TRUE" 
        ImageUrl="../images/spshome.gif" Description="This template is for new TSI pages" />
 </Template>
</Templates>


Then I did an IIS reset and went to create a new subarea and it had the new template in the list.  After verifying that I could create new pages with my new template, I set about customizing it.  I was able, using FrontPage 2003 (my first time cracking open FrontPage ever), to make it look more the way I wanted it to look (okay, not really the way I wanted it to look, but the way the group that provides direction as to how ugly they want their site to be wants it to look).

As an aside to this, I found that changing the template changed all the pages that were derived from the template as well, which was a nice thing to discover.  I know that sounds dumb, but I wasn't sure whether new pages used the template as a “template” from which they were created but after creation were independent (ie, their own file), or whether they use the template as a “source”, so changing the template would change the page. 

Published Apr 06 2004, 10:01 AM by uber1024
Filed under:

Comments

 

Dave Schwinn said:

Nice!

This was something I was going to look into doing myself but you have saved me the effort.

Also, you have answered my biggest question (which wasn't dumb at all). Does changing the template change existing pages that were based on the template? Sounds like you are saying yes.
April 6, 2004 11:08 AM
 

ZD said:

I found it very helpful.

Could You please indicate which files are exactly responsible for what ?

I've added my template under
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\1033\SPSZD\"

and it really appeared in the list - thanks, but how can I customize it? There is so much bulk info their ...
April 26, 2004 9:48 AM
 

uber said:

What I do, after I add the template, is to just modify the default.aspx page in the directory (in your case:
C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\1033\SPSZD\default.aspx)

Open it up in Frontpage or Visual Studio or even notepad and poke around in it. You'll probably want to format it a bit better than it is at the start, but that's not hard to do with Visual Studio.

You can do a lot by modifying that page.
April 26, 2004 11:17 AM
 

ZD said:

Thanks, I am the beginner, but start to understand smth ;)

The way I finally decided to go is following:

1) I decided to start with my own Theme. My company requires own corporal colors and I spent 2 days modifying one of the themes to fit my own needs. But I want to say that there exist several places, where scripts do not insert "class=" info in the tags, so it is almost unreally to properly modify stylesheet. But I've finished with it.

After this step I have my theme installed. Thanks God.

2) Then I have a task infront of me - I need whole portal site to use the theme, but also I need that some individual sections (areas) use their own templates/themes.

So I have further questions:
a) Can I assign my theme to the whole portal? Is there an elegnt way, or I have to substitute Microsoft default stylesheets ?

b) What is the best way to solve the task ? Create separate template for each area that should look differently and in the each template provide extra reference to a style sheets that override my default settings ? Is it a good approach ?
April 29, 2004 8:40 AM
 

uber said:

I have no idea, my man. I use Sharepoint Portal Server 2003, not Windows Sharepoint Services. SPS2003 does NOT support themes.
April 29, 2004 9:50 AM
 

ZD said:

Tell me if I am starting to kill You with the questions ;)

I also use Share Point Portal Server 2003. Look in \TEMPLATE\THEMES directory. I think Server allows to apply themes only to personal sites ;(

---------------------------------------- so ...

Maybe You will help me to understand what the template is ?

Right now I think that template is a complete page, so when I say to create subarea it COPIES files from the template and creates a new virtual site in the database, right ?

So I have questions - I need to provide my own layout and style ... where do I have to put my .css files to have access from all the sites ? To the global layout ?

And for the each area I want to look different I need to create different template with reference to my .css file ?
April 29, 2004 10:13 AM
 

Shelley said:

I use Sharepoint Portal 2007.  In your description you said to make a copy of  SPS* directories. Is their another name for sps? Unfortunately, I don't see it

June 7, 2007 12:39 PM
 

Nishikant said:

hi as i gone through the forums. as i have to add new template in share point 2003 . so is their any way to add template by changing the setting only.

July 2, 2007 1:59 AM

Leave a Comment

(required)  
(optional)
(required)  
Add