How can I add an Index btn to Topic Toolbar?

This forum is for all Flare issues related to the WebHelp Mobile target and skins
Post Reply
Sharpras
Sr. Propeller Head
Posts: 138
Joined: Fri May 05, 2006 10:17 am
Location: Redmond, WA

How can I add an Index btn to Topic Toolbar?

Post by Sharpras »

I would like a button in the topic toolbar just like the HOME button, but points to the Index page. Is that doable? I see the ADD A CUSTOM TOOLBAR BUTTON in the Mobile skin editor. It looks like I would need some JavaScript!

Also, which of the two Index.htm pages do I point to:
. . .MyWebHelpMobile\Advanced\Resources\Index.htm
or
. . .MyWebHelpMobile\Basic\Resources\Index.htm

Thanks
Roger
Flare 6.1, Windows XP
Don't know JavaScript.
NorthEast
Master Propellus Maximus
Posts: 6365
Joined: Mon Mar 05, 2007 8:33 am

Re: How can I add an Index btn to Topic Toolbar?

Post by NorthEast »

You don't need to create your own, there is already a button to do that - add the SelectIndex button.
Sharpras
Sr. Propeller Head
Posts: 138
Joined: Fri May 05, 2006 10:17 am
Location: Redmond, WA

Re: How can I add an Index btn to Topic Toolbar?

Post by Sharpras »

Thanks, Dave, but . . .
Dave Lee wrote:You don't need to create your own, there is already a button to do that - add the SelectIndex button.
I don't see such a button available for the WebHelp-MOBILE. (I may have failed to mention Mobile since this is the WebHelp Mobile forum.) I only see six items under Styles > ToolBarItem. No SelectIndex.

Any ideas, workarounds?
Roger
NorthEast
Master Propellus Maximus
Posts: 6365
Joined: Mon Mar 05, 2007 8:33 am

Re: How can I add an Index btn to Topic Toolbar?

Post by NorthEast »

In Mobile, you can't add a button in the area where the Home button is; you can only add buttons to the topic toolbar.

The index file is <Basic>|<Advanced>/Resources/Index.htm.
So if all your topics are in the root Content folder, then you could use following OnClick action for the button:

Code: Select all

window.location.href('../Resources/Index.htm');
However, if you organise your topics in folders, then the path to that file will be different for each topic, so you'd need some scripting to handle that.
Sharpras
Sr. Propeller Head
Posts: 138
Joined: Fri May 05, 2006 10:17 am
Location: Redmond, WA

Re: How can I add an Index btn to Topic Toolbar?

Post by Sharpras »

Thank you. I'll give it a try.
When I am in a topic, I see the grey bar at top with the HOME button in it. I'd call it a toobar, but if I can't add a button there, it sounds like there may be another Toolbar that displays? (I guess I'll find out.)
NorthEast
Master Propellus Maximus
Posts: 6365
Joined: Mon Mar 05, 2007 8:33 am

Re: How can I add an Index btn to Topic Toolbar?

Post by NorthEast »

Sharpras wrote:Thank you. I'll give it a try.
When I am in a topic, I see the grey bar at top with the HOME button in it. I'd call it a toobar, but if I can't add a button there, it sounds like there may be another Toolbar that displays? (I guess I'll find out.)
Yeah, it's a separate toolbar; it works the same way as the WebHelp toolbar, it's just placed in the topic.
You need to include the topic toolbar proxy in the master page, and select what icons you want to appear on the Topic Toolbar tab in the mobile skin.
Flare's help should cover it.
Sharpras
Sr. Propeller Head
Posts: 138
Joined: Fri May 05, 2006 10:17 am
Location: Redmond, WA

Re: How can I add an Index btn to Topic Toolbar?

Post by Sharpras »

Dave, thanks for the code--it works great with one exception: the single quotes should be double quotes.
Here it is again w/ dble quotes [if they don't get lost in fourm-translation.

window.location.href("../Resources/Index.htm");

The other trick was that the Help indicates that TYPE default works without creating a button image for the Topic Toolbar, but didn't work for me; I created a button image.

Roger
NorthEast
Master Propellus Maximus
Posts: 6365
Joined: Mon Mar 05, 2007 8:33 am

Re: How can I add an Index btn to Topic Toolbar?

Post by NorthEast »

Sharpras wrote:Dave, thanks for the code--it works great with one exception: the single quotes should be double quotes.
I've just tried this with single quotes, and it works fine for me. It also works with double quotes.
Post Reply