The 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.
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