Title Display in the Browser for Top Navigation Layout

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
kcummings
Jr. Propeller Head
Posts: 3
Joined: Thu May 22, 2014 12:54 pm

Title Display in the Browser for Top Navigation Layout

Post by kcummings »

We switched over to using the Top Navigation from the Tripane skin. In the Tripane target, you can set the title displayed in the browser in the General tab > Caption field. In the output, the page title is converted, so that the browser tab displays what you added to that caption plus what the actual page's name is.

There doesn't appear to be a similar functionality in the Top Navigation skin. I am trying to figure out how I can add this to the Top Navigation without individually changing all the page titles. Any thoughts?
tri_panel_navigation.png
browser_tabs.png
You do not have the required permissions to view the files attached to this post.
GregStenhouse
Sr. Propeller Head
Posts: 330
Joined: Tue May 13, 2008 3:27 pm
Location: Christchurch, New Zealand

Re: Title Display in the Browser for Top Navigation Layout

Post by GregStenhouse »

You are right, the code in MadCapAll.js that constructs the document title is not hit at all for top nav, the title within each page is the one that ends up on the browser tab. That means you should be able to add some script to your master page to construct the document title however you want.

As an example, add something like this to the head in your master page:

Code: Select all

<script>
  document.title = "Online Help - " + document.title;
</script>
kcummings
Jr. Propeller Head
Posts: 3
Joined: Thu May 22, 2014 12:54 pm

Re: Title Display in the Browser for Top Navigation Layout

Post by kcummings »

That absolutely did it. You are awesome, GregStenhouse! Thanks for the help! :)
Michelle_Gardner
Propeller Head
Posts: 24
Joined: Mon Apr 14, 2014 10:22 am

Re: Title Display in the Browser for Top Navigation Layout

Post by Michelle_Gardner »

Excellent! Thank you, @GregStenhouse, for the solution, and @kcummings for asking the question.
mehul-shetty
Jr. Propeller Head
Posts: 1
Joined: Thu Jan 24, 2019 2:23 am

Re: Title Display in the Browser for Top Navigation Layout

Post by mehul-shetty »

Thank you @GregStenhouse, that was of great help!
Niels
Propeller Head
Posts: 89
Joined: Thu Dec 15, 2016 8:41 am
Location: Köln

Re: Title Display in the Browser for Top Navigation Layout

Post by Niels »

I guess that this should also work with the side navigation but we don't have a master page. So is there an equivalent place where else to put this kind of script?
I don't see where else to set a static browser tab title in the skin settings.

We started with Flare 2018 and PDF output only, where we use page layouts instead of a master page. Must we then introduce a master page for online output? So far we saw no need for this...

Update (1): It does not seem to be a good idea to introduce a master page, as this changes other layout details...
Update (2): Ok, it seems to work: To avoid undesired changes we just need to remove certain proxy elements from the default Master Page that is generated.
Post Reply