Developing branding solutions for 2013

21
Developing Branding Solutions for 2013 Thomas Daly, [email protected] om

description

 

Transcript of Developing branding solutions for 2013

Page 1: Developing branding solutions for 2013

Developing Branding Solutions for 2013Thomas Daly, [email protected]

Page 2: Developing branding solutions for 2013

About Me SharePoint Consultant @ B&R Business Solutions

Developer Branding

Focused on the UI side of things Community Involvement

Speaker NJ SP Princeton User Group SharePoint Saturday NYC organizer NothingButSharePoint.com – Helper / Contributor My SharePoint Blog MSDN forums

Page 3: Developing branding solutions for 2013

Topics we’ll cover Creating Branding Based Project in Visual

Studio 2012 Deploying Assets

Themes CSS, Images & JavaScript Master Pages Composed Looks

Additional Page Head CSSRegistration, ScriptLink, Cache Busting Feature Receivers

Page 4: Developing branding solutions for 2013

Where are we starting from?

MasterPage

CSSThemePalette

Images Web Fonts

Page 6: Developing branding solutions for 2013

Considerations Where will you deploy files? Will it be a Sandbox or Farm level solution? Will it be SPSite or SPWeb based scoping? Will you be auto applying master pages,

themes or composed looks? Will you be pushing branding down to

subsites? Will you need any additional scripts to

programmatically apply / unapply?

Page 7: Developing branding solutions for 2013

Building Simple Project Mapped Images Folder

Feature Image Mapped Layouts Folder

CSS Files Images JS Files

Modules Master Pages

Page 8: Developing branding solutions for 2013

Deploying a Composed Look

Page 9: Developing branding solutions for 2013

What do we need in a Composed Look? Master Page Theme Palette Background Image [optional] Font Scheme [optional]

Page 10: Developing branding solutions for 2013

Building the Project Modules

Theme [Definition] Fonts [Definition]

Layouts Web Fonts Background Image

Elements Composed Look [Definition]

Page 11: Developing branding solutions for 2013

Alternative Branding Technique No Custom Master Page Attach Custom Style Sheets or Scripts

Additional Page Head

Page 12: Developing branding solutions for 2013

Additional Page Head Additional Page Head – a delegate

control located in the <HEAD> of SharePoint master pages. Can be used to load multiple controls via code without touching the master page directly.

Page 13: Developing branding solutions for 2013

User Control & Element

Element

User Control

Feature

Page 14: Developing branding solutions for 2013

Sandbox Solution Alternative Like a trick, ScriptLink is used to link JS

files CustomAction<CustomAction Id="SiteCSS" Location="ScriptLink" ScriptBlock="document.write('&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/_layouts/15/SharePointProject1/myStyles.css&quot;&gt;&lt;/' + 'link&gt;');" Sequence="203" />

Page 15: Developing branding solutions for 2013

Building the Project User Control Element

Pointer to User Control Sandbox ScriptLink

Page 16: Developing branding solutions for 2013

Feature Application of BrandingFeature

Feature Receiver

Composed Look

Site Icon

Master Page

Page 17: Developing branding solutions for 2013

Auto Brand New Sites By default, (Non-Publishing) SharePoint does not

trickle down applied themes, master page & css By creating Web Provisioned Event Handler we can

make the new children sites have the same branding as their parent.

Common things to set are: Master Page Url Custom Master Page Url Site Logo Parent Navigation Theme / Composed Look

Use Synchronous Property

Page 18: Developing branding solutions for 2013

Optimization Techniques

Page 19: Developing branding solutions for 2013

Consideration for CSS & JavaScript CSS Files

Use CSSRegistraiton

JavaScript Files Use ScriptLink

Top Reasons SharePoint

Ensures Loading Once

Can specify what to load after

Uses SharePoint built-in cache busting

Page 20: Developing branding solutions for 2013

Cache Busting Calculated MD5 hash of the file contents Will ensure a fresh copy will be delivered Auto-gen hash each time file is modified File must be relative to the layouts

[CSS] _layouts/1033/styles/<MyFolder>/<MyFile.css>

[JS] _layouts/<MyFolder>/<MyFile.js>

Page 21: Developing branding solutions for 2013

Questions or Comments?

Contact information Thomas M Daly Company – http://www.bandrsolutions.com Blog – http://thomasdaly.net Twitter - _TomDaly_ Email

[email protected] [work] [email protected] [personal]

LinkedIn