Hidden inline text in header not always hidden

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
moshe
Propeller Head
Posts: 46
Joined: Tue Apr 05, 2016 10:10 pm
Location: Jerusalem, Israel

Hidden inline text in header not always hidden

Post by moshe »

I would like to include a keyword in a topic header (h1) for online search optimization (header text is given higher weight in a search), but I don't want the keyword to actually be displayed in the header itself. In general, for hidden text I have a CSS style .hidden { display: hidden; } which, when applied to an inline span, hides the span text in topic content. This works in headers and text inside the topic. However, the hidden text is not hidden in SideNav menus, which use the headers for menu item labels. Apparently Flare strips the inline style from the header text when processing the header for use as a menu label.
I don't want the text to appear in the menu label, just like it doesn't appear in the header inside the topic.
Can anyone think of a workaround?
In the following image, the text "(Delegated Authority)" is within the .hidden span:
FlareHidden.png
You do not have the required permissions to view the files attached to this post.
Moshe Davis
Jerusalem, Israel
NorthEast
Master Propellus Maximus
Posts: 6418
Joined: Mon Mar 05, 2007 8:33 am

Re: Hidden inline text in header not always hidden

Post by NorthEast »

The side navigation menu label will display whatever you have set in the TOC as the Label (in the TOC item's properties).

So you could do this two ways:

(1) If the TOC item's Label is set to [%=System.LinkedTitle%] then it'll display the title of the topic. As you haven't set a topic title, this will default to use the first heading. So to fix this, open Topic Properties (for the topic, not TOC item), go to the Topic Properties tab, then set the Title of the topic you want to display in the menu.

(2) Change the TOC item's label to the title you want to show in the menu (so it doesn't get it from the topic).

Method (1) is better if you want to set the topic title once so it works in any TOC.
Method (2) is better if you have the topic in multiple TOCs, but want to use a different title in each TOC.
Post Reply