WebHelp: Best way to get the whole map tree into JavaScript?
Post here questions and problems related to editing and publishing DITA content.
WebHelp: Best way to get the whole map tree into JavaScript?
Hi,
Publishing WebHelp responsive through Oxygen Editor; what would be the best way to get the whole map tree into javaScript? Transforming it to a json object would be nice if I can find where to put the template to process the topicref structure and place it in the footer. I'm already reading some values with whc:macro but I don't know how I could process the map tree?
I want to add a class to visited topics (in the left menu and the tiles on the index page) but need to make sure subtopics are visited before tagging a top level!
My script is currently working fine with the limited left menu tree but the whole tree is never accessible; neither from the top menu bar or the left/right menu tree. I tried the applyRecursion parameter mentioned in topic21201.html but I’m using tiles on the index page and this would not work if the loaded page is not index.html.
If I cannot find a way to add this transformation to the publishing process/template, how could I get a copy of either "toc.xml" or "webhelp-top-menu.xml" from the temp folder to the output folder? I could always read this file through AJAX.
Thanks for any idea you might have.
Regards,
Raymond
Publishing WebHelp responsive through Oxygen Editor; what would be the best way to get the whole map tree into javaScript? Transforming it to a json object would be nice if I can find where to put the template to process the topicref structure and place it in the footer. I'm already reading some values with whc:macro but I don't know how I could process the map tree?
I want to add a class to visited topics (in the left menu and the tiles on the index page) but need to make sure subtopics are visited before tagging a top level!
My script is currently working fine with the limited left menu tree but the whole tree is never accessible; neither from the top menu bar or the left/right menu tree. I tried the applyRecursion parameter mentioned in topic21201.html but I’m using tiles on the index page and this would not work if the loaded page is not index.html.
If I cannot find a way to add this transformation to the publishing process/template, how could I get a copy of either "toc.xml" or "webhelp-top-menu.xml" from the temp folder to the output folder? I could always read this file through AJAX.
Thanks for any idea you might have.
Regards,
Raymond
Re: WebHelp: Best way to get the whole map tree into JavaScript?
Hello,
You can generate the Publication TOC as JSON file by processing the temporary toc.xml file.
For this you need to register an XSLT file on the com.oxygenxml.webhelp.xsl.createNavLinks XSLT extention point.
I have created a sample Publishing Template that generates a toc.json file in the output directory. The PT is available here: https://github.com/oxygenxml/oxygen-pub ... s/json-toc
Regards,
Alin
You can generate the Publication TOC as JSON file by processing the temporary toc.xml file.
For this you need to register an XSLT file on the com.oxygenxml.webhelp.xsl.createNavLinks XSLT extention point.
I have created a sample Publishing Template that generates a toc.json file in the output directory. The PT is available here: https://github.com/oxygenxml/oxygen-pub ... s/json-toc
Regards,
Alin
Alin Balasa
Software Developer
<oXygen/> XML Editor
http://www.oxygenxml.com
Software Developer
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: WebHelp: Best way to get the whole map tree into JavaScript?
Hi Alin,
Thank you very much for taking the time to answer my question.
I will study your template and adapt my script to read from this JSON file.
Best regards,
Raymond
Thank you very much for taking the time to answer my question.
I will study your template and adapt my script to read from this JSON file.
Best regards,
Raymond
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service