- There are two different MasterPage settings: the site MasterPage and the system MasterPage
- Site MasterPage is used by publishing sites
- System MasterPage is used by foundation sites and e.g. list views also on publishing sites
- The two above can be the same, or they can be different, e.g. if the publishing sites have no or a custom left navigation (or the publishing site version of the left navigation), the list views and foundation sites need a master with the quicklaunch navigation
- If there is a special MasterPage for the TopLevelSite (e.g. intranet front page), which often is the case (when it is not sufficient to simply hide elements from a special front page PageLayout), set this one first, and then you will need to set the MasterPage separately for each second level site because of the inheritance behavior described below
- While all other sites are fine with these one or two masters, the search site needs its own, for by default it uses the minimal.master, so we need to have a custom MasterPage derived from the minimal.master in order to show all elements on the page as should be
- About the inheritance:
- Publishing sites automatically inherit the MasterPage from its parent site
- When the Publishing feature is turned on for a foundation site, it too inherits the (system) master of its parent site
- When activating the custom UI feature with a MasterPage-setting feature receiver, the MasterPages will be set for all existing foundation sites, but not the ones created after this
- The MasterPages are referenced in a feature receiver or event receiver as
- Site Master : CustomMasterUrl
- System Master: MasterUrl
As to how to create a custom UI solution, see Creating a Custom UI Solution for SharePoint
and for instructions on creating a feature receiver and event receiver for masterpages, see Setting MasterPages to Sites Automatically.
No comments:
Post a Comment