Some things to note about using “Templates”

I’ve been doing some testing, mainly prompted when I was questioned about Site Templates (I originally thought that Workflows built in SharePoint Designer would not be copied over in templates) and they proved me wrong! I have done some reasonably extensive testing, and have come to the following results:

Quick Summary

  • SharePoint Designer Workflows will ONLY be copied over in a SITE TEMPLATE WITH CONTENT (any other configuration fails)
  • Custom Workflows (including the “out of the box” ones) will be copied over in ALL TEMPLATES.
  • If you hide the “default” content type then it will re-appear after using a Template.
  • Version history is not preserved when using templates with content.

List Templates include the following items:

  • Custom Workflows
  • Adding more Content Types
  • Re-ordering the Content Types
  • Changing the default Content Types
  • Adding a custom Content Type
  • Versioning Settings
  • Content approval Settings

Site Templates include all of the above, but if you also select “Include Content” then you will also get “SharePoint Designer Workflows”!

If is important to note that if you hide one of the “out of the box” content types from your list then saving a List Template OR Site Template will not have any effect! The content type will be back and visible when your new list / site is provisioned!

I then did some more general “what if” scenarios:

 

Query

Answer

What happens if the custom Content Type in the Site Template does not exist in the target system?

It creates a LOCAL (i.e. list level) copy of the Content Type, and links it to the parent of the original content type.

This means that it works as it used to work, but the “central” copy of the content type no longer exists so maintenance has to be done manually and changes cannot be “pushed down”.

What happens if you delete a Custom Content type while it is in use normally?

Error – “The Content Type is in use”

If you save with content, does it preserve version history?

No.

All items copied over will be created as version 1.0.

All draft versions are removed.

 

It is also important to state the Disadvantages of using Templates and that is mainly regarding Site Templates, and it is 3 main things:

  • Performance. Using lots of site templates will degrade the performance of your system.
  • Maintability. Maintaining the structure going forward will be difficult, as you have no “schema” to modify. All you can do is
  • Limited to the User Interface. Mainly with reference to lists, changing the default fields, default content types, and modifying some of the “back end” properties is not possible through the user interface, and therefore cannot be achieved using “List Templates”.
  • Automation. There is still much more flexibility in terms of automation when using “definitions”. We can tie in event handlers and automation tools to do “almost anything”.