none
Custom Master Page for Wiki Pages RRS feed

  • Question

  • Master page for Wiki pages will be different from master page for the site. How can I do that?

    Someone on these forums suggested that I should use event receiver for that but I am not sure what method/property I need to use. Any suggestions?

    Friday, December 10, 2010 9:01 PM

Answers

  • Wiki Page is a page layout. So, you can build your custom master page and a Wiki Page layout, something like this:

    <asp:Content runat="server" ContentPlaceHolderID="PlaceHolderMain">
      <div style="padding:11px 0px 0px 0px;">
    	  <div class="col-fluid-1">
    		  <div class="col-fluid-2">				
    			  <div class="edit-mode-border">
    				  <PublishingWebControls:RichHtmlField id="PageContent" FieldName="PublishingPageContent" DisableInputFieldLabel="true" runat="server"/>
    			  </div>
    		  </div>
    	  </div>		
      </div>
    </asp:Content>
    


    Regards,
    Chakkaradeep | SharePoint Server MVP | SharePoint Solutions Specialist | http://www.intergen.co.nz | http://twitter.com/chakkaradeep | http://www.chakkaradeep.com
    Wednesday, December 15, 2010 9:11 PM

All replies

  • Hi diffident

    Take a look to the below post

    http://social.technet.microsoft.com/Forums/en-US/sharepointsocialcomputing/thread/0fe309a6-7398-43d9-b04a-d738fa4c92b8

    Regards


    Ahmed Naji SharePoint Geek
    MCP|MCTS
    My Blog | DotnetFinder
    Friday, December 10, 2010 9:33 PM
  • I've read that and as I mentioned my site's master page is different from Wiki library's master page.

    I need to apply this to all wiki pages that are generated on-the-fly. I do not want to go into each site, open it in SharePoint designer and apply the custom master page.

    Thanks!

    Friday, December 10, 2010 9:46 PM
  • Any pointers?

    Tuesday, December 14, 2010 5:51 PM
  • Hi,

     

    How wiki pages are created? is it added from SharePoint site? I think if u can control the wiki page creation then u can control the master page. Let's have a scenario:

    1. all wiki pages r created by clicking a custom button in the ribbon. The button executes your custom code under the hood.

    2. As the user click the button in the ribbon, you can write code to copy a template wiki page (already saved in the site somewhere) into destination folder. The template wiki page can use any master page u defined in the template page.

     


    Thanks,
    Sohel Rana
    http://ranaictiu-technicalblog.blogspot.com
    Wednesday, December 15, 2010 5:26 AM
  • Do you have a reference code that does that? End users will be creating the wiki pages and will be using OOTB sharepoint interface for that. So, I cannot make customization on that end.
    Wednesday, December 15, 2010 7:34 PM
  • Wiki Page is a page layout. So, you can build your custom master page and a Wiki Page layout, something like this:

    <asp:Content runat="server" ContentPlaceHolderID="PlaceHolderMain">
      <div style="padding:11px 0px 0px 0px;">
    	  <div class="col-fluid-1">
    		  <div class="col-fluid-2">				
    			  <div class="edit-mode-border">
    				  <PublishingWebControls:RichHtmlField id="PageContent" FieldName="PublishingPageContent" DisableInputFieldLabel="true" runat="server"/>
    			  </div>
    		  </div>
    	  </div>		
      </div>
    </asp:Content>
    


    Regards,
    Chakkaradeep | SharePoint Server MVP | SharePoint Solutions Specialist | http://www.intergen.co.nz | http://twitter.com/chakkaradeep | http://www.chakkaradeep.com
    Wednesday, December 15, 2010 9:11 PM