NEW User - Turn off side nav for Home page topic

This forum is for all Flare issues not related to any of the other categories.
Post Reply
cpreuit
Jr. Propeller Head
Posts: 3
Joined: Mon May 06, 2019 8:05 am

NEW User - Turn off side nav for Home page topic

Post 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.
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

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

Post 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.
Paul Pehrson
My Blog

Image
cpreuit
Jr. Propeller Head
Posts: 3
Joined: Mon May 06, 2019 8:05 am

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

Post 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!
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

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

Post by doc_guy »

Yay! Glad it was helpful!
Paul Pehrson
My Blog

Image
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

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

Post 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.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Louise Bennett
Propeller Head
Posts: 81
Joined: Mon Apr 04, 2016 7:53 pm

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

Post 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.
Louise Bennett
Propeller Head
Posts: 81
Joined: Mon Apr 04, 2016 7:53 pm

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

Post 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.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

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

Post 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.)
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
NorthEast
Master Propellus Maximus
Posts: 6354
Joined: Mon Mar 05, 2007 8:33 am

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

Post 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.
Louise Bennett
Propeller Head
Posts: 81
Joined: Mon Apr 04, 2016 7:53 pm

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

Post 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.
NorthEast
Master Propellus Maximus
Posts: 6354
Joined: Mon Mar 05, 2007 8:33 am

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

Post 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.
Louise Bennett
Propeller Head
Posts: 81
Joined: Mon Apr 04, 2016 7:53 pm

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

Post 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.
NorthEast
Master Propellus Maximus
Posts: 6354
Joined: Mon Mar 05, 2007 8:33 am

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

Post 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.
Louise Bennett
Propeller Head
Posts: 81
Joined: Mon Apr 04, 2016 7:53 pm

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

Post 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.
You do not have the required permissions to view the files attached to this post.
Psider
Propellus Maximus
Posts: 810
Joined: Wed Jul 06, 2011 1:32 am

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

Post 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?
Louise Bennett
Propeller Head
Posts: 81
Joined: Mon Apr 04, 2016 7:53 pm

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

Post 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...
Psider
Propellus Maximus
Posts: 810
Joined: Wed Jul 06, 2011 1:32 am

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

Post 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)
Louise Bennett
Propeller Head
Posts: 81
Joined: Mon Apr 04, 2016 7:53 pm

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

Post by Louise Bennett »

It worked! You are a legend. This has been doing my head in for a week.

Thanks a lot.

Louise.
Post Reply