Home » Branding » A demonstration of how to custom brand SharePoint sites with the Alternate CSS property included with the April 2014 CU for SharePoint 2013

A demonstration of how to custom brand SharePoint sites with the Alternate CSS property included with the April 2014 CU for SharePoint 2013

VisualSP Logo 250x80The last half hour of the second video tutorial on how to transform SharePoint customizations to conform with the SharePoint App Model is taken up with a demonstration of how to use the AlternateCSSUrl web property. The title of the video tutorial is Transform SharePoint Customizations to SharePoint App Model: (02) Controlling Branding in SharePoint Using App Model. The tutorial is led by Steve Walker and Vesa Juvonen, two Senior Program Managers at Microsoft.

The AlternateCSSUrl web property was included in Microsoft’s April 2014 CU for SharePoint 2013. This property, “Alternate CSS”, is exposed in the Client Side Object Model (CSOM). Vesa Juvonen demonstrates how to use the property with Visual Studio. He notes “we can override any of the out-of-the-box styling, if needed” with this property. The reason for implementing this property is to achieve desired customization without modifying any Master Pages.

I have written several posts on this video tutorial and intend to continue reviewing the entire set of six videos. The recommendation not to modify any Master Pages runs through the first and this second video tutorials. The techniques presented and, subsequently, demonstrated in this second video tutorial constitute examples of how to achieve desired changes without disrupting the core components of SharePoint 2013, which in the case of this video are stylistic in nature and core to the branding of sites. With the inclusion of this web property, Juvonen notes it is no longer necessary (for current implementations) to use JavaScript Injection to achieve comparable results. The code used for the demo is available for download to VisualStudio from GitHub.

Juvonen’s demonstration provided me with a useful example of how CSOM can be used to safely add custom content to SharePoint from a Provider Site, in conformance with the App Model. In this case CSOM is used to add a custom CSS file to the Site Assets library. Another CSOM object, FileCreationInformation, is actually used to perform the upload from the Provider Site. A custom logo property is included, as well.

Bottom line, the CSOM as published with ther April 2014 CU for SharePoint 2013 should be a “must review” item for any organization requiring substantially customized branding for SharePoint sites.

©2015, Ira Michael Blonder & Rehmani Consulting, Inc. All Rights Reserved

Leave a Reply