Friday, April 8, 2011

SharePoint 2007 Site Template Content Types

I am new to SharePoint development. We have created a base site template and have used that template to start new sites in other locations on the same server. This works fine but the newly created site seems to "flatten" the custom content types created in the original site. I would think there would be a way to keep the original content type inheritance intact to help support any necessary modifications on the new site. They can still make the modifications but they take longer because you have to visit each list individually. Does anyone know how to fix this or know a better way to approach this?

From stackoverflow
  • Hi Adam,

    The best way to do this is to create a site definition where the content types are within features whose scope is to the farm.

    Tim

  • The problem you are having is the move from your original site collection to another. The site template does not store the complete definition of a site - only the differences from the underlying site definition. Move from one site collection to another and you lose the underlying site definition and run into problems such as the loss of your content types.

    Site templates and site definitions are two separate customizations you can undertake. You need to make a decision based on your requirements as to which is best.

    Site templates

    Pro's:

    • Easy to create and reuse through the SharePoint interface
    • Ideal for end users
    • A site template is a customization of the underlying default site definition

    Con's:

    • Dependency on underlying site definition means SharePoint updates could break your site templates
    • Poor performance since the modifications are held in the database and are read from the DB and compiled on each request
    • Limited customization options

    Site definitions

    Pro's:

    • Harder to create: involves coding XML
    • Made by developers and site administrators
    • Independent of SharePoint default site definitions so not affected by SharePoint updates
    • Limitless customization options

    Con's:

    • Difficult to modify when deployed
    • Can be cached on the file system so is fast to load

    Check out Google for info on creating custom site definitions.

    Hope this helps!

    Jonny

    Adam Carr : Thanks for the clarification! Huge help!
    Adam Carr : Is there a specific site or resource you used to gather this information? A book you would recommend?
  • An article on Sharepoint Site Templates

    http://dotnetdreamer.com/2009/05/09/introduction-to-site-templates/

0 comments:

Post a Comment