Content Type ID
Wednesday, August 15th, 2007Another Sharepoint quick tip here. I was recently working on putting in a custom feature, and needed to add the ‘Content Type ID’ to the xml. (sidenote: if you’re creating publishing sites as your main site template, and you need set pages created for each site, it looks like you want to create those additional pages as a feature. This will allow for central administration of those pages, so you can easily change them down the road rather than a site by site update, since the site definition or site templates really won’t let you do this for additional “pages”. Chris O’Brien talks about some of this, and has some nice walkthroughs on custom features.)
For the life of me I couldn’t find out where to get the Content Type ID of a custom content type I created. Then, thankfully, I ran across this post by Andrew May talking about Content Type IDs. Which stopped me running head first into a wall, as there isn’t much out there on this subject.
The main point I found useful on this topic was (emphasis mine):
If you want to take a look at actual content type IDs in WSS, here’s what you can do: navigate to the Content Type Gallery for a site. When you click on a content type, the URL to that content type contains a parameter, ctype, which is in fact the content type ID for that content type.
So you don’t need to do digging through the database, or write up some custom code. Just browse to your Content Type Gallery.

