Tuesday, October 6, 2009

Multiple Templates per Document Library

I recently got a typical FAQ in my inbox:
"I have set up a sharepoint document library which has a template associated with it, whereby when you create a new document by selecting "new" from the menu bar, the document opens using the associated template.
What I would like to know is, is it possible to associate multiple templates to a document library so that when creating a new document by selection "new", you are offered a choice of templates to use? I'm hoping this is possible!!!"

Nothing simpler than that. The magic word is called Content Types. Okay. Two words then.
You can associate one template with a document library and associate one template with a content type(CT). As soon as a document library(DL) has more than one content type associated with it you will get more than one option when hitting the little arrow next to the new button. Careful, hitting the "New" on the New button will always start up the default CT, which is the first in the list.
So what to do next? Go to the site where you want to use multiple templates and under Site Settings go to the Content Type Gallery. There you create a new CT based of the existing CT called "Document". Now under Advanced Settings of that CT you can upload a new template to use when the New action is chosen. Finally go to Settings page of the DL in quesiton and enable multiple CTs under Advanced Settings of that DL. That will bring up a new section on the Settings page called... "Content Types" where there is a link to add from existing CTs. using that link add your new CT to the list and you're done. You can add as many as you like, but beware, the list should not get too long or you will get usability problems.
One last tip. You can create new CTs at the root of your site collection or within an individual site. CTs are visible only to the site you created it in and all its sub sites. So creating it at the root makes it visible across the whole site collection, but creating it in a specific site will make sure it does not appear further up in the hierarchy or in any of the sibling sites. This can be handy when certain CTs only make sense for specific DLs or specific sites. It is a good idea though to sit down and have a good think about where these CTs could be used and plan ahead where to create them.

1 comment:

Unknown said...

Thank you Alex! This has helped me immensely!
Sean