I'm using the SideNav Template and I've also added a menu proxy to provide a topic content list based on the headings in the topic.
However, I would like to hide the proxy entirely if there is only the primary heading and no sub-headings.
I feel like this should be possible just with CSS but I can't figure it out.
Any thoughts?
Conditionally hide the Menu Proxy
Re: Conditionally hide the Menu Proxy
You could perhaps count the elements on the page with jQuery .length and hide the menu with JavaScript if there are subheadings present?
Re: Conditionally hide the Menu Proxy
I did this, I think - don't have Flare at the moment, by setting H1 to mc-heading-level: 0 in the MainStyles.css (I think that's the one for the skin?). It means that the H1 isn't included in your menu proxy so only the H2, H3 etc display. It there are no h2 etc, then no menu displays.
It may be a problem for print output, but it didn't seem to have any negative effect on the tripane toc, but I haven't checked top nav or side nav.
It may be a problem for print output, but it didn't seem to have any negative effect on the tripane toc, but I haven't checked top nav or side nav.