Thursday, November 20, 2014

Branding SharePoint : Page Layouts

A Page Layout in SharePoint allows you to create a template for a page that users apply to their content for a consistent layout of information. Unless master page there could be different page layouts for different page types. For e.g. in a product catalog we could have single master page and a different page layout for each category. An electronics pages might need image placeholder but on some other category not.

We basically design the structure on the content placeholder of Master Page.


  • Inserting Webparts and Webpartzones
  • Creating the layout of the pages (within the bounds of the master page)
  • Controlling page-level design elements.
  • Including page-level css files to override master page styles
  • Including custom codes for a particular type of pages (javascript, etc.). Please note we could also add JS ro master page but that will apply to all the pages. 
  • Things that occur only on this page layout, not site-wide 


Location of Page Layout:
Just like page master pages Page Layouts are also available in Gallery available in Site Settings

How is Master Page and Page Layout connected:
Each page layout has a MasterPageFile element which decides which master page will render when any page with the page layout will render.

Please layouts are available in the publishing site template and for that we will need a publishing content types.

Click here to learn how to create Page Layouts.

Saturday, November 8, 2014

Branding SharePoint : SharePoint Master Page

Lets start with Understanding what exactly Master Page in SharePoint is.

Master Page is like a template which is applied on all the pages of the site. It Provides the basic structure to all the pages on the site and provides certain place holders to be filled with content.

Controls which are needed through out all site pages are added here. Master Pages mostly used for the following:

  • Linking CSS files.
  • Calling JavaScript
  • Top and Left Navigation
  • Site Footers.
  • Tracking Code like Google Analytic.
Now that we understand, what Master Page is Lets see how we could customize Master Pages:

Master pages are available in the Master Page gallery which is available in site settings. You can simply download the files, update in any file editor and upload it back. I prefer to work with SharePoint Designer.

To customize the master page in SharePoint designer, open the site in SharePoint designer and open the master pages from left navigation.

We can either create a master page from scratch or copy any master page and modify as per our needs. Once we are done all we need to do is to set the new master page as default master page for the site. we could use the set as default command available in the ribbon.

For deeper understanding on customizing master page, visit this Microsoft link.  

Note: You might see many elements which could sound like of no use, but SharePoint use them. You it is important not to remove any element unless you know what you are doing

Thursday, November 6, 2014

Branding SharePoint : Customize SharePoint CSS

There are two ways to update SharePoint CSS.

  • Add Alternate Access CSS on your site.
  • Update the default SharePoint CSS file.
Default SharePoint CSS is available on following paths:
  • Sharepoint 2013 : C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15/1033\styles\Themable\corev15.css
  • Sharepoint 2010 : C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\1033\STYLES\CoreV4.css
You can update these CSS files as per your needs. This Link provides quite a good details on the styles. This CSS file is directly linked in the master page of the site and hence impact the complete site.

Alternate Access CSS: Updating the default CSS could even impact the whole site badly if you are not good with CSS. So this is the alternate option. Go to Master page from Site Settings. Here you will find find a place to put in the URL of a CSS file. Styles in this file are given more importance than default CSS file. So we can create a CSS file, store it any where on the SharePoint and connect here.