WebHelp: Best way to get the whole map tree into JavaScript?
Posted: Sun Oct 17, 2021 5:47 am
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