Reference to ListTemplate ID’s MOSS
Lately I’m building different kind of features, which can be very easy and interesting, but more on that later on. When I tried to bind some of those features to different kind of lists I came across the subject of ListTemplate ID’s.
ListTemplate ID’s
Every ListTemplate is associated with a different kind of ID, a value which can be used within a feature. For instance, a announcements list template is associated with the value 104. This can be very useful if you want to bind your feature to just document libraries.
<Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <Receivers ListTemplateId="104"> <Receiver> <Name>DeletingEventHandler</Name> <Type>ItemDeleting</Type> <SequenceNumber>10000</SequenceNumber> <Assembly>DeletingEventHandler, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f5cce5f062aa189d</Assembly> <Class>DeletingEventHandler.DeletingAction</Class> <Data></Data> <Filter></Filter> </Receiver> </Receivers> </Elements>
The example above shows how to use a event receiver in your elements.xml file of a feature. In this case my event handler feature registers receiver for the ItemDeleting event of a Announcements list template. It uses my custom code described in the DeletingAction class (.cs).
Reference ListTemplate ID’s.
It can be useful to know the different kind of ListTemplate ID’s when you create features. When googling I came across some reference posts on ListTemplate ID’s. I decided to put them together into one table and added two Listtemplate ID’s I discovered myself. I found 1300 Translation Management library & 1301 Languages & Translations. For all the others ID’s the credits go to MSDN library, Mike Smith & Alex from Phase 2.
| # | TemplateName | TemplateDescription |
|---|---|---|
| -1 | InvalidType | |
| 100 | Generic List | |
| 101 | Document Library | |
| 102 | Survey | |
| 103 | Links | |
| 104 | Announcements | |
| 105 | Contacts | |
| 106 | Calendar | |
| 107 | Tasks | |
| 108 | Discussion Board | |
| 109 | Picture Library | |
| 110 | Data Sources | |
| 111 | Web Template Catalog | |
| 112 | User Information | |
| 113 | Web Part Catalog | |
| 114 | List Template Catalog | |
| 115 | Form Library | |
| 116 | Master Page Catalog | |
| 117 | No Code Workflows | |
| 118 | Workflow Process | |
| 119 | Wikipage Library | |
| 120 | Custom List in dataview | |
| 130 | Data Connection library | |
| 140 | Workflow history | |
| 150 | Project tasks | |
| 200 | Meetings | |
| 201 | Agenda | |
| 202 | Meeting User | |
| 204 | Decision | |
| 207 | Meeting Objective | |
| 210 | Textbox | |
| 211 | Things to bring | |
| 212 | Home Page library | |
| 301 | Posts | |
| 302 | Comments | |
| 303 | Categories | |
| 432 | KPI list | |
| 433 | Report library | |
| 850 | Pages | |
| 1100 | Issue tracking | |
| 1200 | Admin Tasks | |
| 1300 | Translation Management library | |
| 1301 | Languages & Translations | |
| 2002 | Personal Document library | |
| 2003 | Private Document library | |
| 2100 | Slide library |
If there are any errors in the table above or you have new ID’s please let me know.
Tags: eventhandler, eventreceiver, feature, id, listtemplate, reference, xml
How to create & deploy a custom theme in MOSS?
About 3 years ago this was one of the first questions I got when I started my first internship. Back then I was working with Sharepoint Portal Server 2003 & WSS v2. Soon I discovered it wasn’t as easy as it looked, but I got the basic idea. Every modification was by hand, but has something changed since then?
Classic 2003 way to create a custom theme
Create a custom theme the ‘2003 way’ was mainly copying, pasting & editing files on the sharepoint web server. Especially the editing of the theme stylesheet, which contains a enormous amount of elements & classes, was a hell of a job. Fortunately tools like Color cop & Internet Explorer developer toolbar made it a bit manageable. Also resources like Heather Solomon’s CSS reference guide were pretty useful.
The basic steps were:
1. Copy a existing theme on the MOSS web server
2. Renaming setup file (.inf)
3. Modifying the stylesheets, images
4. Adding the theme to the TEMPLATE\LAYOUTS\1033\SPTHEMES.XML file
If you are searching for howto’s I can recommend articles from: Sharepoint End User Content Team, Tigirry’s Sharepoint Blog & Dan Lewis
Creating a custom theme MOSS style
Since then a lot has changed in the world of Sharepoint. Cool things like solutions, timer jobs & features were introduced with the release of MOSS. But googling on “create custom theme moss” still gives the same result. Copying & editing theme files on the web server.
Has nothing really changed since then? No, some things have changed, thanks to the wonderfull MOSS community.
That is also the main reason of this post. Two days ago I came across a this post from Keith Dahlby from Solutionizing.net about his STSDev Theme solution generator. He wrote that he added this option to the codeplex project STSDEV. It automates all step 1,2 & 4 described in the 2003 way and adds it to a Visual Studio project. And instead of manually copying it to the web server it creates a solution!
Adding import technique to Theme solution project in VST
One of the drawbacks of this was that if you upgrade the theme solution you still had to re-apply it by hand to the sites that are already using it. In some scenario’s this can be a problem. At this point the @import technique described by Heather Solomon comes around the corner. Keith Dahlby was already talking about implementing this in his generator, so looking forward to it.
In the meantime I manually added the import technique to my Visual Studio project, this is how I did it.
1. Follow Keiths steps described in this post to develop a theme solution project with STSDEV found on Codeplex
2. Create a new folders in the ROOTFILES directory for your theme.css file, I use the LAYOUTS/1033/STYLES/ location, as described in Heather’s @import technique post.

3. Copy your theme.css file from the THEMES folder in ROOTFILES into the newly created folder in step 2

4. Edit the theme.css file in the THEMES folder by removing al styles and replacing it by the single line:
@import "/_layouts/1033/styles/ExpiscornovusTheme/theme.css";
5. That’s it, if you build the project you get a solution file (.wsp). Next time you upgrade your theme solution you don’t have to re-apply the theme to every individual site that uses it, just press (ctrl + ) F5!
Customizing
Although this solution makes the creation and deployment of custom themes a lot easier it is still a good idea to think about customizing. Customizing a theme is still basicly editing a extensive CSS file. If you want it to look completely different from the basic MOSS look be aware this could be a hell of a job with all those elements. If you want to read more about theme customization I can recommend one resource in general: Heather Solomon’s blog. She has a lot of great articles on customizing, so definitely visit that blog.
Update 07-10-2008
Removed step 5 because the ddf & manifest files are modified during the rebuild process.
Tags: CSS, Howto, Solution, SPThemes, STSDev, Theme
Love/hate affair
I have love/hate affairs with a lot of things. One of them is Microsoft Office Sharepoint Server. Another one is blogging. A while ago I did both. Time to give it another try.
