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

Title Display in the Browser for Top Navigation Layout

Postby kcummings on Mon Apr 17, 2017 2:24 pm

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.
kcummings
Jr. Propeller Head
 
Posts: 3
Joined: Thu May 22, 2014 12:54 pm

Re: Title Display in the Browser for Top Navigation Layout

Postby GregStenhouse on Mon Apr 17, 2017 6:49 pm

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>
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

Postby kcummings on Tue Apr 18, 2017 1:15 pm

That absolutely did it. You are awesome, GregStenhouse! Thanks for the help! :)
kcummings
Jr. Propeller Head
 
Posts: 3
Joined: Thu May 22, 2014 12:54 pm

Re: Title Display in the Browser for Top Navigation Layout

Postby Michelle_Gardner on Thu Jul 19, 2018 10:22 am

Excellent! Thank you, @GregStenhouse, for the solution, and @kcummings for asking the question.
Michelle_Gardner
Propeller Head
 
Posts: 15
Joined: Mon Apr 14, 2014 10:22 am

Re: Title Display in the Browser for Top Navigation Layout

Postby mehul-shetty on Wed Feb 13, 2019 4:23 am

Thank you @GregStenhouse, that was of great help!
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

Postby Niels on Thu Mar 21, 2019 9:39 am

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.
Niels
Propeller Head
 
Posts: 51
Joined: Thu Dec 15, 2016 8:41 am
Location: Stuttgart


Return to Web-based Outputs

Who is online

Users browsing this forum: No registered users and 4 guests