Page 1 of 1

NEW User - Turn off side nav for Home page topic

Posted: Wed May 15, 2019 8:47 am
by cpreuit
Greetings from a MadCap Flare newbie (and sole technical writer here).

I am using the Side Nav template for my project. I want my Home (landing page) to look different from the rest of my topics (with no side navigation). I created a new Home Master Page, and the only elements on it are the topic body proxy, a table, and a snippet with copyright information.

I have a second Master Page for all the other topics in the project that includes breadcrumb proxy, topic body proxy, mini-toc proxy, and topic toolbar proxy.

I have assigned the Home Master Page to my Home topic.

However, when I build and view my project, I still have the side navigation pane on my Home topic. I do not want to show the toc navigation on my Home topic.

I'm sure it's something simple, but I haven't been able to figure it out on my own or using the Flare Help. I found a few similar questions here, but none seemed to help me.

Thanks, in advance, for any assistance you can provide.

Re: NEW User - Turn off side nav for Home page topic

Posted: Wed May 15, 2019 9:09 am
by doc_guy
Well, the property that controls that space is called <div class="sidenav-wrapper">.

So what I would try (I don't have a way to test this at the moment, so this is a guess) is going into the master page of the home page and adding the following to the <head> section:

Code: Select all

<style>
     div.sidenav-wrapper {
          display:none;
     }
</style>
That should hide the side nav on pages that use that home page.

If that doesn't work, come back and we'll look at the resulting code and see what we need to do.

Re: NEW User - Turn off side nav for Home page topic

Posted: Wed May 15, 2019 9:58 am
by cpreuit
Paul, you are my hero. I would never have figured out how to do that myself. I had searched through the UI looking for the magic pill for my issue, and I had looked at the Text Editor version of the page, but didn't even see the <head> section. So, I added it based on your suggestion, and it worked. Thank you!

Re: NEW User - Turn off side nav for Home page topic

Posted: Wed May 15, 2019 3:58 pm
by doc_guy
Yay! Glad it was helpful!

Re: NEW User - Turn off side nav for Home page topic

Posted: Thu May 16, 2019 4:39 am
by ChoccieMuffin
Take a look at one of the sidenav templates, and you'll see that there's also a separate CSS for the Home page, that contains all the buzzers and bells that you probably only need on your home page. Keeping the home page styles separate means that you keep the main stylesheet used for your topics is kept much cleaner, so it's easier to find what you're looking for.

Re: NEW User - Turn off side nav for Home page topic

Posted: Thu Sep 26, 2019 10:19 pm
by Louise Bennett
Hi Paul,

I've added the style info to the header but my side nav is still appearing. Wondering if there could be something else forcing it to appear?

Louise.

Re: NEW User - Turn off side nav for Home page topic

Posted: Sun Sep 29, 2019 7:22 pm
by Louise Bennett
I figured it out. The side-nav wrapper style didn't exist in my style sheet. Once I added it as a div style, the menu bar disappeared.
Can anyone tell me what the corresponding style for the header would be called? I'd like to also modify this on my home page if possible.

Thanks, Louise.

Re: NEW User - Turn off side nav for Home page topic

Posted: Mon Sep 30, 2019 6:51 am
by ChoccieMuffin
I can't answer your question directly, but if you inspect the code on the generated page you will probably find a suitable pointer. (Sorry to be so vague.)

Re: NEW User - Turn off side nav for Home page topic

Posted: Mon Sep 30, 2019 7:56 am
by NorthEast
It's div.title-bar-container

However, if you hide this div, it will leave a blank space at the bottom of the container div.sidenav-layout, which contains the side nav and topic. This happens because Flare sets a fixed size for this container that takes into account the header size.

Re: NEW User - Turn off side nav for Home page topic

Posted: Mon Sep 30, 2019 9:22 pm
by Louise Bennett
Thanks all. It was working as I had hoped on my test project so I tried to apply it to another (bigger) project, and now I am back at the same place I started. No matter what I do, the side nav won't disappear.

I've compared the target files, style sheets, and the skins and I can't find anything that would be stopping it from disappearing, but there is obviously something lurking somewhere. I've even tried copying the home page and the master page for the home page into the bigger project, and that doesn't help. Aarrgghh!

Any ideas?

Louise.

Re: NEW User - Turn off side nav for Home page topic

Posted: Tue Oct 01, 2019 12:35 am
by NorthEast
Check (1) there's a link to the stylesheet in either the home topic or master page (used by the home topic), (2) the target is set to allow local stylesheets.

Re: NEW User - Turn off side nav for Home page topic

Posted: Tue Oct 01, 2019 5:31 pm
by Louise Bennett
Thanks Dave. I checked, and these things are both set. So its a mystery.

I have imported some of the content from the larger project into the test project and it is working as I want it to, so there is obviously something particular to the larger project that is causing the problem. If I can import all the content into the test project and it continues to keep working, I'll just bin the large project. That would seem to be the quickest solution.

Louise.

Re: NEW User - Turn off side nav for Home page topic

Posted: Tue Oct 01, 2019 11:42 pm
by NorthEast
Press F12 in your browser, and use the inspect tool. If you select div.sidenav-wrapper, you will see what CSS is being used.

Re: NEW User - Turn off side nav for Home page topic

Posted: Mon Oct 07, 2019 6:39 pm
by Louise Bennett
Hi Dave,

I did this and saw the info below. Not sure what it means that the div.sidenav-wrapper entry is crossed out?
Inspect_tool.png
As you can see from the image pointing out behind the inspect tool, the pesky gray sidenav is still there.

Louise.

Re: NEW User - Turn off side nav for Home page topic

Posted: Mon Oct 07, 2019 7:07 pm
by Psider
It's crossed out because some other style is taking precedence. Possibly the first style shown in your screenshot? However, everything looks a bit weird. For example, the class names aren't displaying as I'd expect. Is that Edge you're using?

Re: NEW User - Turn off side nav for Home page topic

Posted: Mon Oct 07, 2019 7:08 pm
by Louise Bennett
OK, I think I have found something.

Inside my project I have run-time skins so users can switch from a light skin to a dark skin. If I remove these additional skins, the sidenav-wrapper disappears as is the wanted the behavior. If I dd them back in, and enable Generate all Skins in the target, the sidenav-wrapper is back.

So it would appear that the home page cannot decouple itself from the additional skins, which are causing the sidenav to appear.

Pretty out of my depth here, so hopefully it sparks something for someone else...

Re: NEW User - Turn off side nav for Home page topic

Posted: Mon Oct 07, 2019 7:09 pm
by Psider
Assuming the style is in the home page html page, you could append !important to force it to take precedence.

display: none!important;

(I'm assuming that would work, but I haven't tried it myself)

Re: NEW User - Turn off side nav for Home page topic

Posted: Mon Oct 07, 2019 7:23 pm
by Louise Bennett
It worked! You are a legend. This has been doing my head in for a week.

Thanks a lot.

Louise.