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?
Title Display in the Browser for Top Navigation Layout
Title Display in the Browser for Top Navigation Layout
You do not have the required permissions to view the files attached to this post.
-
- 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
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:
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>
Re: Title Display in the Browser for Top Navigation Layout
That absolutely did it. You are awesome, GregStenhouse! Thanks for the help!
-
- Propeller Head
- Posts: 24
- Joined: Mon Apr 14, 2014 10:22 am
Re: Title Display in the Browser for Top Navigation Layout
Excellent! Thank you, @GregStenhouse, for the solution, and @kcummings for asking the question.
-
- Jr. Propeller Head
- Posts: 1
- Joined: Thu Jan 24, 2019 2:23 am
Re: Title Display in the Browser for Top Navigation Layout
Thank you @GregStenhouse, that was of great help!
Re: Title Display in the Browser for Top Navigation Layout
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.
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.