SharePoint · SharePoint 2013

SharePoint 2013 – Branding Variations sites


Variations and Branding

In SharePoint 2013 a css field can be included in the master page file by adding the following line:

<!–SPM:<SharePoint:CssRegistration name=”<% $SPUrl:~sitecollection/_layouts/15/1033/STYLES/Branding2013/Styles.css?ver=0.1 %>” runat=”server” after=”corev15.css”/>–>

This however doesn’t work for variations enabled sites. My site has multiple languages. One of them being Arabic.

The Solution

To make this work for variations use the following line instead:

<!–SPM:<SharePoint:CssRegistration Name=”Branding2013/Styles.css?ver=0.1″ runat=”server” />–>

SharePoint looks by default in the following path :~sitecollection/_layouts/15/1033/STYLES therefore my Branding2013 folder is found in each of the locale folders ( e.g. 1033) Do make sure that you deploy a css for each of the variations used.

To make sure that you only need to maintain one css file for all the variations and only the exceptions in the 1164 ( Arabic) folder it’s bets to include both of the pieces of code:

<!–SPM:<SharePoint:CssRegistration name=”<% $SPUrl:~sitecollection/_layouts/15/1033/STYLES/Branding2013/Styles.css?ver=0.1 %>” runat=”server” after=”corev15.css”/>–>

<!–SPM:<SharePoint:CssRegistration Name=”Branding2013/Styles.css?ver=0.1″ runat=”server” />–>

Now does the 1164 version only need the minimum amount of css as all the code is first picked up fro the 1033 version of the css file.

Advertisements

Please leave a comment or feedback

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s