Project Description

A SharePoint solution that makes Branding SharePoint sites as easy as 1-2-3. SPEasyBranding provides two features that allow the injection of CSS and JavaScript files into the DOM using either a web part (for updating a single page) or master page delegate. CSS and JS files are added to the page head always (even when using the single page web part feature). This way it overrides the built in SharePoint CSS styles. The solution is compatible with all SharePoint versions since WSS 3.0, including MOSS 2007, Foundation 2010, and SharePoint 2010. Just enter the URLs of the CSS and JS files in text fields and they are added in the right place. No need to use SharePoint Designer or Visual Studio. Just create a CSS or JS file (notepad?), upload to a SharePoint Library, and then add the URL to the custom site settings page or web part property (depending on what feature is activated, and how you are using it). That's it!

Instructions

Download the WSP and add the solution to SharePoint. Compatible with WSS 3.0, SharePoint 2007, Foundation 2010, and SharePoint 2010. Adds 2 features to your Site when deployed. The Global Feature adds the specified CSS and JavaScript files to the Master Page's HEAD section. CSS and JavaScript files can be entered using a custom settings page found in the Site's Site Settings page (_layouts/settings.aspx), located in the Site Collection Settings section. The WebPart Feature adds a web part that can be added to any Web Part page. The web part properties provides a custom settings section that also allows specific CSS and JavaScript files to be added.

File URLs should be entered in the provide text fields (simple but effective). The URLs should be either relative to the SharePoint root site, or be absolute. Multiple URLs can be added, include a vert-pipe character to delimit them (|). URLs are added to the page in the order they are entered in the text fields.

Example URLs:
  • /_layouts/folder/file.css
  • ~/_layouts/folder/file.css
  • _layouts/folder/file.css
  • http://server/_layouts/folder/file.css).

Built in Visual Studio 2008 using WSPBuilder, so its forward compatible with current and past SharePoint versions.

Examples:

SNAG-000557.png
Custom Settings Page

SNAG-000558.png
Web Part Properties

A product by Ben Steinhauser, brought to you by B&R Business Solutions.

Last edited Feb 1, 2012 at 6:55 PM by bandrben, version 5