SharePoint Branding Project
SharePoint Branding Project
Version 2.0 Available now!
The guide on how to Download, Install, Configure, Modify, Deploy and Verify the SharePoint Branding Project:
This template is used to create a new SharePoint branding solution wsp package, the package includes custom masterpage, stylesheet, logo and favicon. The wsp includes an activation and deactivation feature as well as a childweb eventreciever to apply branding on all subsites when created.
The SharePoint Branding Project is created by
Technical Specialist SharePoint
BLKSTHL – Blog
Meeting Workspace master, mini-navigation on minimal master, automatic selection and application of masterpage based on sitetype.
Version 1.151 With minimal master and search styles. Added in 1.15 full support for SharePoint Foundation added
This project is built for SharePoint Server 2010, SharePoint Foundation 2010 and Visual Studio 2010. It is a Site Collection Feature and activation will replace the master and the site logo, it will also add a favicon and a custom css.
1.15 Now included support for Foundation. Because of the limitation in SharePoint Foundation that makes $SPUrl unavailable when getting a relative URL to the current sitecollection, code for foundation that replaces $SPUrl has been added. Instructions on how to configure this in included in the project inline and in the readme file. The SharePoint component affected are the custom CSS, the Favicon and the site logo. These can now be placed in the site collection root and still be accessable in the subsites that uses the same masterpage.
1.1. Included is a minimal masterpage and basic Search classes. The minimal masterpage are used in a search center instead of the normal master. The MyBrandingMinimal.master will be deployed to the masterpage library and will be available to select in the site settings/Masterpage settings for a search site. Added to the MyStyles.css are also classes to support basic Search and Search Results styles. The included styling can easily be edited to suit your own needs. Deploy the solution as normal and then manually change the masterpage for the search site to the mybrandingminimal.master.
After installing the vsix template to your Visual Studio 2010, Start a new project, select a new SharePoint 2010 Branding project, give it a name and create the project. Then enter a URL to your SharePoint 2010 sitecollection in the Project Properties, under Site URL.
Remember that the template will only be installed in Visual Studio to the user that executed the vsix file.
Farm vs. Sandboxed
The project is by default configured as a sandboxed code, so If your farm is running in Sandboxed mode or if your site is an Office365 then you can deploy it as is. If your farm does not have the sandboxed code service running, then you need to configure this project to be deployed as a farm solution. This setting is available in the project properties. To deploy as a farm solution – Set the value ‘Sandboxed solution’ to False. (requires the user to have SharePoint administrator privileges to deploy the solution)
SharePoint Foundation 2010
The project support usage on SharePoint Foundation with slight modifications, the $SPUrl has to be replaced with a relative or absolute link, or a different approach that uses a similar method to the $SPUrl that is available on Foundation.
The reason for this is that the $SPUrl in a publishing function and as such it is only available on SharePoint Server 2010.
See Version 1.15 above.
To deploy the project to the designated site, Build menu – Deploy Solution (requires Visual Studio to run with elevated privileges, ‘Run as Administrator’).
To deploy in production, build the project in Build menu – Deploy Package. The wsp package will be located under <Your Projects folder>\ProjectName\ProjectName\Bin\Debug\ProjectName.wsp
Deploy the wsp to your farm using PowerShell(Requires Add-PSSnapin Microsoft.SharePoint.Powershell):
Add-SPSolution -LiteralPath <SolutionPath>
(Add-SPSolution -LiteralPath c:\solutions\ ProjectName.wsp)
Install-SPSolution -Identity <SolutionName> -WebApplication <URLname> -GACDeployment
(Install-SPSolution -Identity ProjectName.wsp -WebApplication http://www.company.com -GACDeployment)
Update-SPSolution -Identity ProjectName.wsp -LiteralPath c:\solutions\ProjectName.wsp -GACDeployment
A deployed solution will show as a Site Collection feature, this will have the same name as you r Visual Studio Project, activating it enabled all of the branding, deactivating it will replace the master with v4.master and remove the logo.
The SharePoint Branding Project by BLKSTHL is licensed under a Attribution-NonCommercial-ShareAlike
3.0 Unported (CC BY-NC-SA 3.0) License