SharePoint 2010 Web Templates What are They and How to Conquer Them Ryan McIntyre, MCITP, MCPD...

15

Transcript of SharePoint 2010 Web Templates What are They and How to Conquer Them Ryan McIntyre, MCITP, MCPD...

Page 1: SharePoint 2010 Web Templates What are They and How to Conquer Them Ryan McIntyre, MCITP, MCPD Director, Portals & Collaboration Practice.
Page 2: SharePoint 2010 Web Templates What are They and How to Conquer Them Ryan McIntyre, MCITP, MCPD Director, Portals & Collaboration Practice.

SharePoint 2010 Web Templates

What are They and How to Conquer Them

Ryan McIntyre, MCITP, MCPDDirector, Portals & Collaboration Practice

Page 3: SharePoint 2010 Web Templates What are They and How to Conquer Them Ryan McIntyre, MCITP, MCPD Director, Portals & Collaboration Practice.

Templates are Good for…Nothing?

• Usability– Site Creators– Window Shoppers

• Promote Functionality• Reporting• Administration• Uhh…Sounds like Governance!

Page 4: SharePoint 2010 Web Templates What are They and How to Conquer Them Ryan McIntyre, MCITP, MCPD Director, Portals & Collaboration Practice.

Template Family

Site Definitions

Web Templates

Site Templates

Page 5: SharePoint 2010 Web Templates What are They and How to Conquer Them Ryan McIntyre, MCITP, MCPD Director, Portals & Collaboration Practice.

Site Definitions

• Farm Solution• Requires file system (no O365)• Can’t change ONET after sites provisioned• Feature Stapling

Page 6: SharePoint 2010 Web Templates What are They and How to Conquer Them Ryan McIntyre, MCITP, MCPD Director, Portals & Collaboration Practice.

Site Templates

• Publishing sites not supported• SC scoped (unless VS modified)• Environment Locked

Page 7: SharePoint 2010 Web Templates What are They and How to Conquer Them Ryan McIntyre, MCITP, MCPD Director, Portals & Collaboration Practice.

DEMO SITE TEMPLATES

Page 8: SharePoint 2010 Web Templates What are They and How to Conquer Them Ryan McIntyre, MCITP, MCPD Director, Portals & Collaboration Practice.

Web Templates

• 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*

Page 9: SharePoint 2010 Web Templates What are They and How to Conquer Them Ryan McIntyre, MCITP, MCPD Director, Portals & Collaboration Practice.

Import Site Template

• Import what you need• Change project Deployment Configuration• Change Feature Default Activation behavior• Change Deployment Conflict Resolution• Visibility• SiteFeatures

Page 10: SharePoint 2010 Web Templates What are They and How to Conquer Them Ryan McIntyre, MCITP, MCPD Director, Portals & Collaboration Practice.

DEMO SITE TEMPLATE IMPORT

Page 11: SharePoint 2010 Web Templates What are They and How to Conquer Them Ryan McIntyre, MCITP, MCPD Director, Portals & Collaboration Practice.

Clean Web Template

• 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

Page 12: SharePoint 2010 Web Templates What are They and How to Conquer Them Ryan McIntyre, MCITP, MCPD Director, Portals & Collaboration Practice.

DEMO WEB TEMPLATE CREATION

Page 13: SharePoint 2010 Web Templates What are They and How to Conquer Them Ryan McIntyre, MCITP, MCPD Director, Portals & Collaboration Practice.

Add Content

• 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

Page 15: SharePoint 2010 Web Templates What are They and How to Conquer Them Ryan McIntyre, MCITP, MCPD Director, Portals & Collaboration Practice.

Ryan McIntyre

[email protected]

http://blog.randomdust.com@ryanmcintyre

303-520-6337