Collapsible navigation tree

Oxygen general issues.
amik
Posts: 2
Joined: Thu Oct 21, 2010 1:14 pm

Collapsible navigation tree

Post by amik »

I'm working in Author with DITA and would like to make sections of the navigation tree in the HTML output expandable/collapsible. Is this achieved via a parameter or is a special script required?
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: Collapsible navigation tree

Post by Radu »

Hi,

Oxygen 12 comes with a separate WebHelp transformation plugin which generates a TOC with expand/collapse icons. Our user manual is generated using it, see this section for example:
http://www.oxygenxml.com/doc/ug-oxygen/ ... ation.html

If you are using an older version of Oxygen or want to customize the XHTML transformation, you have the option of the TOCJS DITA Open Toolkit plugin which comes pre-installed in the DITA Open Toolkit bundled with Oxygen.

So you create a new DITA Map transformation using the TOCJS transformation type and transform the DITA Map. This will generate javascript for the table of contents. Then you combine the javascript with the XHTML output to get a frameset version. You can find more details in the link from the user manual I posted above.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
amik
Posts: 2
Joined: Thu Oct 21, 2010 1:14 pm

Re: Collapsible navigation tree

Post by amik »

Neat! I am on 11.2 at the moment.

I tried TocJS but get this error:

Cannot open the specified file: Specified file does not exist: file:/C:/DITA/out/toctree.js

Any clue why it can't create that file?
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: Collapsible navigation tree

Post by Radu »

Hi,

I need more details.
If you want you can contact us on our support email address and attach the output of the entire Oxygen transformation console.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
HeatherW
Posts: 8
Joined: Tue May 01, 2012 10:05 am

Re: Collapsible navigation tree

Post by HeatherW »

Hi

Did you find the cause of this? I just ran into the same error.

Thanks
Heather
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: Collapsible navigation tree

Post by Radu »

Hi Heather,

Oxygen uses the DITA Open Toolkit to publish DITA content to various output sources.
One of the plugins in the DITA OT is indeed this plugin called TOCJS which generates the TOC as a Javascript tree.

There are two possibilities:

1) The DITA OT generated the "toctree.js" file in another location. There is a bug in the TOCJS plugin which might generate the javascript file just outside the output folder. So you might want to search for the file in the same folder as the DITA Map.

2) The transformation failed for some reason, then you should either look in the console output Oxygen presents in the "DITA Transformation" tab or send us the output and we'll try to take a look at it (support@oxygenxml.com).

Starting with Oxygen 12 we added a new transformation to the DITA OT called "WebHelp" which generates out-of-the-box a frameset version of the output with a Javascript TOC + search capabilities. So you might also want to try this approach.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply