Adding a <div> to the index.html file

Post here questions and problems related to editing and publishing DITA content.
dgallo
Posts: 90
Joined: Tue Mar 31, 2015 10:43 pm

Adding a <div> to the index.html file

Post 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
bogdan_cercelaru
Posts: 222
Joined: Tue Jul 01, 2014 11:48 am

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

Post 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
Bogdan Cercelaru
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
dgallo
Posts: 90
Joined: Tue Mar 31, 2015 10:43 pm

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

Post 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
dgallo
Posts: 90
Joined: Tue Mar 31, 2015 10:43 pm

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

Post 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.
radu_pisoi
Posts: 403
Joined: Thu Aug 21, 2003 11:36 am
Location: Craiova
Contact:

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

Post 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"
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply