3

My company are using Sharepoint 2013. They recently had a contractor do some work to create a Document Library with Managed Metadata and a custom "form" (I don't know if this is correct SharePoint terminology) which appears in the left side navigation when on the Document Library which allows filtering by searching against numerous fields for terms in the Manged Meta Data store.

This works well enough, but now the Company want to hide the Left Navigation on most pages because it takes up too much space.

This was easy enough, I created a new master page based on v4. Set my new master page to be the Site Master page, I then linked this to my own Style Sheet with the following

.ms-core-sideNavBox-removeLeftMargin { display: none } /* hide only the quick links */

/* Make the content the full width of the page with some padding */
#contentBox {
    margin-left: 0px;
    padding-left: 25px;
}

This worked perfectly and removed the left side navigation giving the MGMT what they wanted in more space for content.

However, now when you go to the document library the "form" used to filter the metadata no longer appears because it was added to the left side navigation.

Questions

  1. How did the contractor get the "form" to appear in the Left Side Nav? What files would I need to look at to verify this?

  2. How can I hide the left navigation on ALL pages apart from the Document Library?

I have been reading books on Sharepoint and the concept of Master Pages makes sense on a high level but once I start trying to do anything in Sharepoint it just makes no sense to me.

1 Answer 1

1

I can't tell for sure about you first question, but for you second question I can weigh in.

You have already created a new custom masterpage and added your CSS to that. What you can do, is create yet another one which can practically be a copy of the first one but without the added CSS. Then use the one with the CSS as your Site masterpage and then the other one without the CSS as your system masterpage.
This way you only have the left navigation when on pages using the system masterpage.

This is probably the "easiest" way to solve it. Other methods would require some kind of javascript or delegate controls to achieve the same result.

3
  • Does the CSS need to be embedded within the master page rather than linked via the "Alternate CSS"? Because I have just tried this by going to the "Look & Feel > Master Page" screen and pointing the Site Master page to one file and System Master page to another file. I then point Alternate CSS to my CSS file but I still have the same issue. Do I need to not specify CSS file but instead embed it into one of the Master pages?
    – Sam
    Commented Oct 2, 2013 at 11:23
  • 1
    @Sam To get this to work, you'll have to embed the CSS within on of the masterpages. You can either embed the CSS directly or you can embed a link to a CSS file containing the CSS you need like this: <link rel="stylesheet" type="text/css" href="<path to your css>/MyCss.css />
    – user2536
    Commented Oct 2, 2013 at 11:31
  • Well, that's point 2) answered. Thank you very much. I guess I need to better understand the difference between a Site Page and a System Page in that case. Thanks
    – Sam
    Commented Oct 2, 2013 at 12:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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