Create a list in a portal area based on a list template

If you save a list as a template in a WSS team site and later on go to the create page, this listtemplate appears as one of the list types you can create new instances of on all subsites of the top-level website (sitecollection) that you've stored the template in.

When working in SPS this doesn't seem to work. In fact, all SPS portal areas are really WSS sites with more flavour, and the Home area is really the site collection. This is why sps creates areas in buckets (C1, C2 etc) to stretch the most out of WSS's subsite limitations.

The relevance of this for templates is that all document and list templates is in fact stored in the top-level website (the sitecollection) which, for the SPS portal areas, is the home area. These templates are availible for all the areas in the portal.

But, when you manage content for an area and select "Create" you're redirected to a page called spscreate.aspx, and this page doesn't read the custom templates from the sitecollection. So, you basically have to do this manually. When in the create page of the portal area you want to extend with one of your custom lists or doclibs (that you've uploaded to the portal template gallery) replace the spscreate.aspx with this address:

http://[portalareaurl]/_layouts/[lcid]/new.aspx?NewPageFilename=YourTemplateName.stp&ListTemplate=100&ListBaseType=0

Replace YourTemplateName, and the ListTemplate and ListBaseType with what applies for your template. 100 is custom list, and 0 is list (1 is document library).

Now you're prompted to input the name of the new list instance, and voila; you've created a templated list in your portal area.

To upload your templates so they are accessable with the url above here:

http://[portalurl]/_catalogs/lt/Forms/AllItems.aspx

Update
Andrew Goodwin took the trouble of summarizing the listtypes and basetypes needed to use this url efficiently:

ListTemplate no.s for the default set shown on the spscreate.aspx page:
100 - Custom List
101 - Document Library
102 - Survey
103 - Links List
104 - Announcements List
105 - Contacts List
106 - Events List
107 - Tasks List
108 - Discussion Board
109 - Picture Library
115 - Form Library
120 - Custom List In Datasheet View
1100 - Issues List
(Web Pages templates do not follow the same file usage so can be ignored for the purposes here)

ListBaseType no.s for the default set:
0 - Links, Announcements, Contacts, Events, Tasks, Custom List, Custom List In Datasheet View
1 - Document Library, Form Library, Picture Library
3 - Discussion Board
4 - Survey
5 - Issues

9 Comments

  • Great. Now if we can just figure out how to use site templates the same (or similar way) I wouldn't have to have admin access to my server to add a new one ;)

  • It would be rather cool if it is possible to omit the SPS redirection to the SPS portal area settings and get to the actual WSS admin pages an area. Probably it would mess things up more than it would gain but anyways. Then area templates no longer would have to be made in CAML (which we all love, right?)

  • Thanks for this information! It was not very amusing to find out that list templates were not showing up outside of the root sites.



    One wonders if Microsoft will ever fix these glaring problems in SPS. I don't buy that they can't get around the WSS limitations.

  • Through some limited testing I've discovered that the templates will show up in areas that are the same as it originated from. for exmple, if you created a library on a contents area template area and saved it as a template in the template gallery. That template will show up whenever a contents area template is used again on the portal. If you try to create a topics area on the portal your custom template will not show up.

    I've used the above method to "force" a template to work on any area. Once you do that I've again made that new library a template and it subsequently shows up as an option in whichever area template you've created it from.

    Hope this helps.

  • Can someone please provide a better example of how would a the actual url string would look.

  • Comments (requiredYour URL (optionalName (required)*

  • I found the "BaseType" and "Template" numbers used for "Deliverable": 0 and 1104, respectively. Sweet!

  • New template types (for Project Server):
    Risks - 1101
    Deliverables - 1104

    According to the jscript code in the pages, these are the valuse, however, whenever I try to create a page using these values, it fails. Any ideas?

  • thanks, save me a lot of time!!

Comments have been disabled for this content.