none
multiple master page for a site RRS feed

  • Question

  • Hi,

    I am working on a publishing portal. The publishing portal consists of different pages which has almost same look and feel. So I have created custom the master pages and layout pages. Now the master page contains the global navigation. There are some popup pages which does not have global navigation in their design. So if these pages are also inheriting from master page, they are showing the global navigation. One option for me is to create a page which does not inherit from any layout and master page in page library for popup page. Then I am seeing someting like below in the page view source.

    <!--[if gte mso 9]><xml> ....
    endif]-->

    The other option is to have a two separate master pages. But I do not find any thing that tells me how can I have two master page for a single site.

    Please advice how can I address this issue?

    Thanks!

    Prithwijit

    • Moved by Mike Walsh FIN Wednesday, March 23, 2011 1:15 AM master page question not programming (From:SharePoint - Development and Programming (pre-SharePoint 2010))
    Tuesday, March 22, 2011 8:29 PM

Answers

  • Hi Prithwijit,

     

    yes you can have more than 1 master page in a single site. You should open the pages in sharepoint desinger and then find the page directive in that page.e.g:-

    <%@ Page masterpagefile="~masterurl/custom.master" language="C#"  %> In masterpagefile attribute, you can specify which masterpage you want to apply on the opened aspx page.

    ~masterurl is mapped with the _catalog/masterpage(Master Page Gallery).

    If you are keeping your masterpage file at some different location then you need to specify the full path of that location.


    Thanks -NK
    • Marked as answer by Peng Lei Tuesday, March 29, 2011 8:50 AM
    Wednesday, March 23, 2011 9:48 AM

All replies

  • Hi Prithwijit,

     

    yes you can have more than 1 master page in a single site. You should open the pages in sharepoint desinger and then find the page directive in that page.e.g:-

    <%@ Page masterpagefile="~masterurl/custom.master" language="C#"  %> In masterpagefile attribute, you can specify which masterpage you want to apply on the opened aspx page.

    ~masterurl is mapped with the _catalog/masterpage(Master Page Gallery).

    If you are keeping your masterpage file at some different location then you need to specify the full path of that location.


    Thanks -NK
    • Marked as answer by Peng Lei Tuesday, March 29, 2011 8:50 AM
    Wednesday, March 23, 2011 9:48 AM
  • Hello,

    I tried following these specified steps, but the end result when I attempt to view the site page in browser (via SP Designer 2013) is 

    Sorry, something went wrong

    An unexpected error has occurred.

    I have verified that the master file has been published, and that the full path to it is correctly specified. I am using O365 SharePoint, a publishing site, and SharePoint Designer to edit the Site Page.

    Any advice would be appreciated!

    Thursday, September 7, 2017 8:46 PM