Highlight last used TOC menu item

This forum is for all Flare issues not related to any of the other categories.
Post Reply
Perrorist
Propeller Head
Posts: 93
Joined: Fri Dec 02, 2016 4:04 pm
Location: Central Coast, NSW

Highlight last used TOC menu item

Post by Perrorist »

Is it possible to highlight the last used TOC menu item in an HTML5 output? My client wants to quickly locate the last item he used when returning to the TOC.
Nita Beck
Senior Propellus Maximus
Posts: 3669
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Highlight last used TOC menu item

Post by Nita Beck »

TOC synchronization will highlight the *current* topic's entry in the TOC. To give users a quick way to go back to the prior topic visited, they can use the browser's Back button. Not sure there's anything more complex that's possible. (I've actually put Back and Forward buttons on the topic toolbar, having had to include the scripts to make them work. I'm not on Flare at the moment, but if you're interested, I can dig up the script code later when I'm in the office.)
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
cdschroeder
Sr. Propeller Head
Posts: 189
Joined: Mon Feb 22, 2016 9:18 am
Location: Cincinnati, OH

Re: Highlight last used TOC menu item

Post by cdschroeder »

Nita Beck wrote:TOC synchronization will highlight the *current* topic's entry in the TOC. To give users a quick way to go back to the prior topic visited, they can use the browser's Back button. Not sure there's anything more complex that's possible. (I've actually put Back and Forward buttons on the topic toolbar, having had to include the scripts to make them work. I'm not on Flare at the moment, but if you're interested, I can dig up the script code later when I'm in the office.)
If you don't mind hunting them down, I'd definitely be interested in those scripts, Nita. Back/Forward buttons have been on my to-do list for a while...
Casey

Image
Nita Beck
Senior Propellus Maximus
Posts: 3669
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Highlight last used TOC menu item

Post by Nita Beck »

cdschroeder wrote:If you don't mind hunting them down, I'd definitely be interested in those scripts, Nita. Back/Forward buttons have been on my to-do list for a while...
Here's how I implemented Back and Forward buttons in the topic toolbar in my Top Nav HTML5 output. Turns out it wasn't a complicated script for each, just a bit of on-click coding.

1. I had to craft my own Back and Forward button images, as they are not built into Flare, as the other toolbar buttons are.

2. In the topic toolbar skin (not the main Top Nav skin), on the Setup tab, there's a little button beneath the left panel (it doesn't have a name as far as I can see) with which one can create a "new style" (aka new button). I created one called Back and one called Forward. I then selected both of those buttons to add to the toolbar, just as I would any built-in button.

3. Next, on the Styles tab of the skin editor, I expanded the Toolbar Button to reveal nodes for each of the buttons I selected for the toolbar. I expanded the Back node. Under Background, I selected my custom button image and set Repeat to no-repeat. Under Event, in the Click field, I entered the following:

Code: Select all

window.history.back();
Finally, still for the Back button, on the UI Text tab, I added the tooltip "Back". For the Forward button, I repeated the process, using the following code for the on-click event:

Code: Select all

window.history.forward();
To the original poster, I'm sorry if I've taken your discussion offtrack, although I'm hoping that it's relevant to you, too.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
cdschroeder
Sr. Propeller Head
Posts: 189
Joined: Mon Feb 22, 2016 9:18 am
Location: Cincinnati, OH

Re: Highlight last used TOC menu item

Post by cdschroeder »

Beautiful. Thanks, Nita! I appreciate it. And yes... sorry for steering the conversation elsewhere. Hope you don't mind too much, @Perrorist
Casey

Image
Perrorist
Propeller Head
Posts: 93
Joined: Fri Dec 02, 2016 4:04 pm
Location: Central Coast, NSW

Re: Highlight last used TOC menu item

Post by Perrorist »

Thanks, Nita. That's highly useful and much appreciated.
Post Reply