Page 1 of 1

Adding a <div> to the index.html file

Posted: Tue Jun 28, 2016 12:12 am
by dgallo
Hello,

I need to add <div id="brand" class="hw"></div> to the index.html file in Oxygen webhelp 17.1. I can I go about this?

My reason for this is I created a javascript in the toc.js file to automatically insert the copyright into the webhelp toc pane so that it does not have to be manually added via the transform parameters. I need to automatically insert two different copyrights for two different products, therefore I created a if else statement to do this, but I need to insert the <div id="brand" class="hw"></div> in order to create a true/false scenario.

The other parameters such as args.hdf and args.hdr only seem to put this information in the other topic files and not the index.html file.

Thanks,
Danielle

Re: Adding a <div> to the index.html file

Posted: Tue Jun 28, 2016 3:18 pm
by bogdan_cercelaru
Hi Danielle,

This can be done by creating a different WebHelp transformation scenario for each product and set corresponding value for the "webhelp.copyright" parameter.

Regards,
Bogdan

Re: Adding a <div> to the index.html file

Posted: Tue Jun 28, 2016 4:17 pm
by dgallo
I would rather make this an automatic process with one transform scenario. Is there any way of adding a div to the <body> element of the index.htm file of the webhelp?

Danielle

Re: Adding a <div> to the index.html file

Posted: Tue Jun 28, 2016 4:29 pm
by dgallo
Or if I can even add it to the header of the index.htm file that would be great. Regardless I need this string to be added to the index.htm file.

Re: Adding a <div> to the index.html file

Posted: Wed Jun 29, 2016 2:40 pm
by radu_pisoi
Hi,

If you are using DITA-OT 1.8, the stylesheet that outputs 'index.html' is:

Code: Select all

oXygenInstallDir/frameworks/dita/DITA-OT/plugins/com.oxygenxml.webhelp/xsl/createMainFiles.xsl
To find the place used to emit the webhelp toc pane please search for the next text:

Code: Select all

div id="tab_nav_tree"