S HARE P OINT 2010 W EB T EMPLATES W HAT ARE T HEY AND H OW TO C ONQUER T HEM Ryan McIntyre, MCITP, MCPD Director, Portals & Collaboration Practice
T EMPLATES ARE G OOD FOR …N OTHING ? Usability –Site Creators –Window Shoppers Promote Functionality Reporting Administration Uhh…Sounds like Governance!
T EMPLATE F AMILY Site Definitions Web Templates Site Templates
S ITE D EFINITIONS Farm Solution Requires file system (no O365) Can’t change ONET after sites provisioned Feature Stapling Unique WebTemplateId
S ITE T EMPLATES Publishing sites not supported SC scoped (unless VS modified) Environment Locked
D EMO S ITE T EMPLATES
W EB T EMPLATES Publishing supported Farm or SC scope Feature based (no files on file system) Can’t use variations No Feature Stapling, but can define in ONET No unique WebTemplateId*
I MPORT S ITE T EMPLATE Import what you need Change project Deployment Configuration (No Activation) Change Feature Default Activation behavior (False) Change Deployment Conflict Resolution (None) Visibility SiteFeatures
D EMO S ITE T EMPLATE I MPORT
C LEAN W EB T EMPLATE Blank SharePoint 2010 Project Two Features: Deployment (WebTemplate) & Default (site objects) Object Folders (Lists, Modules, etc.) PropertyBag module: WebTemplate Id WebTemplate Element –Elements.xml –ONET.xml Copy from 14\Templates\SiteTemplates\* Change deployment type to ElementFile Remove DocumentTemplates Remove all configurations EXCEPT -1 & 0 Remove Modules Remove ListInstances Associate Default Feature Pre/Post Deployment Actions
D EMO W EB T EMPLATE C REATION
A DD C ONTENT Publishing Pages / Images –Include file in Module and update properties in elements.xml Wiki Pages –Use elements.xml to add file by referring to existing page template, updating properties as needed (WikiField) List Items –Elements file for ListInstance –Feature Receiver Sub Sites –Feature Receiver
R ESOURCES Vesa Juvonen > SharePoint 2010 and Web Templates: oint-2010-and-web-templates.aspx oint-2010-and-web-templates.aspx Mirjam van Olst > Site Definitions vs. Web Templates: definitions-vs.-webtemplates.aspx definitions-vs.-webtemplates.aspx MSDN > WebTemplates and Site Definitions:
Ryan McIntyre