My 2p about ERP Solutions, Information Worker Solutions and other software products (mainly Microsoft Dynamics AX and Microsoft SharePoint).

08 March 2008

40 application templates: where are the site content types?

by Patrik Luca 3 comments

Tag



Upon using one of the 40 application templates provided by Microsoft, you may be wondering where the site content types are, with which these templates are build. The site content types belong to the site content type group _Hidden: hence they are not visible on the site content types page.

This can be annoying in following scenarios:

  • If you want to create a new site content type which has as parent content type one of those hidden site content types, you can't.

  • If you want to limit the data displayed in a Content Query Web Part on a certain page in your sites, you cannot filter on the Content Type for those hidden site content types.

To move the site content types included in the 40 application templates out of the _Hidden site content type group, follow these steps:
  1. Go to the directory %Program Files%\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\TSATypes

  2. Open the CTypes.xml file with an editor.

  3. Search for the Site Content Type that you would like to make visible in the GUI. I'll give the example with the Service Request Site Content Type of the Helpdesk Application Template.

  4. In the Content Type tag, replace the value for the site content type group (which is set to _Hidden) with the value $Resources:core,List_Content_Types;

  5. Execute following script (it deactivates and reactivates the tsatypes feature and executes an iisreset:
    echo off
    @set PATH=C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN;%PATH%
    @if "%1"=="" (goto invalidParameters)
    stsadm -o deactivatefeature -filename "tsatypes\feature.xml" -url %1
    stsadm -o activatefeature -filename "tsatypes\feature.xml" -url %1
    iisreset
    @goto endOfBatch
    :invalidParameters
    @echo Please call with the correct parameters.
    @echo The correct syntax of this command is:
    @echo tsatypes [siteurl]
    :endOfBatch



Go to Site Actions -> Site Settings -> Site content types: the Service Request Site Content Type is visible on the page in the group List Content Types. Hence it can be used as parent content type for new site content types.

In the Content Query Web Part, the Service Request Site Content Type can be chosen to filter on: choose List Content Types in the dropdown box Show items of this content type group and choose the Service Request Site Content Type in the dropdown box Show items of this content type.

Comments 3 comments
Anonymous said...

Nice Blog. I have tried this and now see the content types but dont get any data? I am using the multiple project template and trying to get the project list.

Patrik Luca said...

Hi,

I think your problem is that you cannot choose the List Type Project Tracking - Projects List in the properties of your Content Query Web Part.

To be able to choose it, you should activate this feature at the parent site of the site on which you are trying to use it in your content query web part.

Execute following command:
stsadm -o activatefeature -filename projProjects\feature.xml -url <here url of your parent site>

Anonymous said...

Thanks so much!! This is exactly what was happening to me and your little snipit of code did the trick. Excellent post.

Patrik Luca, Ieper, BELGIUM
Feel free to use or spread all of the content on my blog. In return, linking back to my blog would be greatly appreciated. All my posts and articles are provided "AS IS" with no warranties.

Subscribe feeds via e-mail
Subscribe in your preferred RSS reader

Subscribe feeds rss Most Read Entries

Subscribe feeds rss Recent Entries

Categories

Recommended Books


Subscribe feeds rss Recent Comments

This Blog is part of the U Comment I Follow movement in blogosphere. Means the comment field of this blog is made DOFOLLOW. Spam wont be tolerated.

Live Traffic Feed

Recent Visitors

Blog Archive

My Blog List

Followers

Guest Links