Pages

Thursday, August 13, 2009

SharePoint Master Pages and Branding

Today I’ll talk about master pages and branding fundamentals into SharePoint :)

Every WSS 3.0 site is provisioned with a special Master Page gallery which contains a master page template known as default.master. This file is deployed in the 12-hive under 12\TEMPLATE\GLOBAL. Each new WSS site provides an instance of default.master. It is possible to customize default.master, but if you do, it becomes unghosted and this can affect efficiently and scalability.

The default.master page contains controls (including links, menus, icons and navigation components), named placeholders, and delegate controls. Named placeholders are used to add unique contents to a page template of page instance that is linked to a master page. Delegate Controls provide a way to substitute elements into the master page layout that affect every site. Delegate Controls are changed via activating features; therefore modifications to delegate controls require no changes to the default.master or site pages that are linked to default.master.

WSS provides several standard controls to support navigation including the SiteMapPath control which populates a breadcrumb navigation menu to allow users to navigate from the current site upwards to the top-level site of current site collection. Navigation is based on the infrastructure provided by ASP.NET 2.0.

You can also create a custom master page template. To do this you must create the master page template itself, and then create a feature that provisions an instance of this master page in the Master Page gallery for a specific site. Finally you need to redirect site pages to use your custom master page instead of using default.master.

You can customized the look and feel of a site (brand it) by using Cascading Style Sheets.You can find standard language specific CSS files in \TEMPLATE\LAYOUTS\1033\STYLES.The primary file is called core.css. This file is scoped at farm level, so it is not a good idea to change it. Instead one way to change the look and feel is to use Themes which are found in TEMPLATE\THEMES.or we can create a custom.css file and put into TEMPLATE\LAYOUTS\1033\STYLES\<your folder>.Brand images are located in TEMPLATE\IMAGES

Keep writing!! 

6 comments:

  1. Thanks! You did a great job.

    Is there anybody know how to create drop down menu in top navigation bar?

    ReplyDelete
  2. Hey

    Thanks for comment.

    You can create dropdown top navigation menu with two ways
    1> Sharepoint User Interface
    2> With using Microsoft.Sharepoint.Navigation

    Please follow this link for more info
    http://dishashah.wordpress.com/2009/11/17/site-navigation-in-sharepoint/

    Hope this helps

    Thanks
    Disha Shah

    ReplyDelete
  3. Hi Disha,

    I was making changes in default.aspx and core.css through designer to give same look and feel. I am wondering that application pages are not reflecting those changes. could you please tell me the appropriate approach so that application pages also reflect the same look and feel as the site pages.

    Thanks,
    Khushi

    ReplyDelete
  4. sorry that is default.master and not default.aspx.

    ReplyDelete
  5. Khusi

    In Sharepoint, All Application Pages refer "application.master" which is same for entire sharepoint farm , across all sharepoint webaapplications.

    You can change look and feel of Site pages per sitecollection by assigning different master pages to every webapplication.

    You can change the look and feel of application pages by modifying "Application.master" BUT It is recomment that DO NOT CHANGE "Application.master"
    Because If you change that it changes for every Sharepoint web application that you have created.

    Hope this helps!!!

    Best Regards
    Disha Shah

    ReplyDelete