1

I want to add a custom element (a sidebar) to every Wiki page created in a subsite. I found a couple of solutions for when you have the publishing feature activated, however, this I want to avoid for it breaking the MDS feature which we need.

Any idea? If nothing else would work I'd be ready to change the default template in a way to not interfere with other sites that don't need this sidebar.. but where to locate the template on the server?

2

You can add the side bar to the master page. However the sidebar will then show on every page within that site.

An other option is to add it manually to every page. This is probably too much work.

Personally I think that working with custom page layouts still is a better solution. But as you already mentioned it needs the publishing feature.

Or use the Enterprise Wiki. I has by default the publishing feature enabled + some other functionality.

  • Great, I'll give this a try! – Juergen Riemer Aug 13 '15 at 7:06
  • at the end it showed to be the easiest to put it into the masterpage (wrapping the div with id "contentBox") .. thanks to both! – Juergen Riemer Aug 13 '15 at 10:32
2

You can create a new Master Page (by copying any existing Master Page) and make the changes in that. Then you need to go into every Wiki page where you want to create the sidebar and change the Page attribute to inherit from that Master Page (typically by using SP designer).

<%@ Page language="C#" MasterPageFile="RelativelinktoMasterPage" Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage,Microsoft.SharePoint,Version=15.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" meta:progid="SharePoint.WebPartPage.Document" meta:webpartpageexpansion="full"  %>

This way, just by editing the Master page, you'll be able to push your changes to the other wiki pages.

  • thanks for your quick reply, one question: we will have our users create their own wiki pages, i.e., it won't be practial to have an admin manually modify each of them. Is there a way to add this by default? I guess by modifiying some template file on the server, right? if so, you'd know where to locate it? – Juergen Riemer Aug 13 '15 at 7:05
  • No. It takes this parameter from the default master page. In that case, I don't think this would be feasible. Enterprise wiki page would be the way to do this I guess. – Akhoy Aug 13 '15 at 7:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.