Expand TOC Nodes onload

This forum is for all Flare issues not related to any of the other categories.
Post Reply
5ynic
Propeller Head
Posts: 40
Joined: Mon Aug 27, 2007 5:21 pm
Location: brisbane, Australia
Contact:

Expand TOC Nodes onload

Post by 5ynic »

I need some of my TOC nodes to default to expanded when the pages loads (I'm outputting to WebHelp).
Searching these forums turned up some threads on expanding Toggles, but not TOC nodes. Does anyone know how to do this?
TIA,
Jay
:flare: :shock:
-- I hope this doesn't get appended to all my posts --
5ynic
Propeller Head
Posts: 40
Joined: Mon Aug 27, 2007 5:21 pm
Location: brisbane, Australia
Contact:

Re: Expand TOC Nodes onload

Post by 5ynic »

Bump?
-- I hope this doesn't get appended to all my posts --
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Expand TOC Nodes onload

Post by LTinker68 »

Can't be done from within Flare. You might be able to modify the Javascript for the TOC, but that would be an after-build modification, so you'd have to do it every time you build the output.

Make sure you submit a feature request asking for this functionality at http://www.madcapsoftware.com/bugs/submit.aspx.

If you have the auto-sync option enabled in the skin, then you might be able to have one book expanded by putting the "welcome" topic inside that book. I've never tried that, so I don't know if the auto-sync will open the book on launch, or if it will just display the "welcome" topic without showing its location in the TOC.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Madcap Guru
Sr. Propeller Head
Posts: 238
Joined: Tue Mar 17, 2009 10:41 pm

Re: Expand TOC Nodes onload

Post by Madcap Guru »

With Auto-Sync and if you have your start-up topic buried deep in the toc, it will open that book for you, but its not currently possible to have it open all books on load. You would have to bug the Madcap guys to add that as a feature.
Rick Ferrell
____________________________

Former Flare and Robohelp Support
Image
5ynic
Propeller Head
Posts: 40
Joined: Mon Aug 27, 2007 5:21 pm
Location: brisbane, Australia
Contact:

Re: Expand TOC Nodes onload

Post by 5ynic »

Thanks guys.
The reason for the request is that some of our users are such noobs, the first time they see the help, it is not intuitive to them, seeing just the one single node that contains all the others, that what you do to access the rest of the content is click that node. At the same time, there is a requirement from other users that the entire structure be navigable via the breadcrumbs - so I can't lose that top level node which contains all the others.
Guru - I might try putting the startup topic one level down, so some of the tree structure is revealed by default - that will help.
Ltinker - I will definitely submit a request for the toc entry books to implement a new property, along the lines of "expanded on startup" to control this behaviour.

Re: Hacking the Javascript:
I found a function called "TOCExpand" in the SkinSupport/MadCapToc.js file. This function takes (node) as its only parameter.
I tried tracing it in Mozilla with Firebug, but had no luck, so I had a few goes guessing at the right value for the top level node (0, 1, "0", "1" etc etc ) and sticking in a call to it in (onload) of both the container and contained frame, but no luck.
-- I hope this doesn't get appended to all my posts --
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Expand TOC Nodes onload

Post by LTinker68 »

What I did was add some text to my "welcome" page that explained how to navigate the help. Just bullet points really, mentioning how to navigate from topic to topic by clicking on books and topics in the TOC, how to search for content using the Search accordion, how to use the Index, the Glossary, the Favorites, etc. Not as helpful if the help is launched via a CSH call, since that "welcome" topic won't be displayed. But in my case, I have that topic situated as the first topic in the TOC and its title in the TOC is "Using the Online Help", so they can click on that at any time to see those same tips.
5ynic wrote:The reason for the request is that some of our users are such noobs, the first time they see the help, it is not intuitive to them, seeing just the one single node that contains all the others, that what you do to access the rest of the content is click that node.
Why have just one book at the top level? That's an unnecessary click for them to expand it. I wouldn't have a slew of books at the top level, but at least group the content somewhat and display those groups (books) at the top level. And even if you start with that one book expanded, they might still wonder "well how do I see the contents in the other books?".
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
5ynic
Propeller Head
Posts: 40
Joined: Mon Aug 27, 2007 5:21 pm
Location: brisbane, Australia
Contact:

Re: Expand TOC Nodes onload

Post by 5ynic »

Why have just one book at the top level?

Because of the requirement that you can navigate from any topic to any other using only the breadcrumbs... I can't think of a way to achieve this without the top-level topic :(
Good idea to have the bullet-point howto tho - I already have a "help about help", so I'll put bullets similar to yours on the page that's displayed when help is launched, and then a "for more detail. click here" linking to the help-about-help section... If they still can't figure out how to use it, they need more help than I can give ;)
As you say, this won't work when opened from a CSH call, but my CHS topics are self-contained, so shouldn't be a huge issue.
Thanks again.
-- I hope this doesn't get appended to all my posts --
Post Reply