Customizing WebHelp Responsive: Menu left / All chapters in TOC

B-E-N
Posts: 94

Customizing WebHelp Responsive: Menu left / All chapters in TOC

Thu Aug 04, 2016 5:28 pm

We are currently customizing the WebHelp Responsive (Tree) to our style. This works fine so far, thanks for the great documentation (https://www.oxygenxml.com/doc/versions/ ... -tips.html).

So far, there are two things I don't know how to customize. It seems that there are no parameters for what I want. Is there another way to implement the following things?
  • How do I get the table of content menu on the left?
  • At the moment, only the selected chapter is displayed in the table of content. Can we have all chapters of the book in the TOC with only the active chapter being open?
HomeGoods
Posts: 86

Re: Customizing WebHelp Responsive: Menu left / All chapters in TOC

Fri Aug 05, 2016 11:48 am

Regarding the menu position, Alex happened to demonstrate in a webinar.
B-E-N
Posts: 94

Re: Customizing WebHelp Responsive: Menu left / All chapters in TOC

Fri Aug 05, 2016 12:32 pm

Great, much easier than expected. Thank you very much!
radu_pisoi
Posts: 307
Location: Craiova

Re: Customizing WebHelp Responsive: Menu left / All chapters in TOC

Fri Aug 05, 2016 12:38 pm

B-E-N wrote:At the moment, only the selected chapter is displayed in the table of content. Can we have all chapters of the book in the TOC with only the active chapter being open?


No, there is no transformation parameter that you can use to display all chapters in the topic's side TOC. I will register this feature request in out issue tracking system.

An workaround is to modify the XSLT stylesheet that produces the side TOC, com.oxygenxml.webhelp/xsl/dita/responsive/navigationLinks.xsl. To achieve your requirement, you have to modify the 'generateSideToc' template.
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
B-E-N
Posts: 94

Re: Customizing WebHelp Responsive: Menu left / All chapters in TOC

Tue Aug 23, 2016 2:33 pm

I didn't get far with trying to modify the 'generateSideToc' template.

Can you point me to the template that generates the main page toc (which includes all ditamaps)? Maybe this will help me figure this out.
radu_pisoi
Posts: 307
Location: Craiova

Re: Customizing WebHelp Responsive: Menu left / All chapters in TOC

Wed Aug 24, 2016 12:03 pm

Hi,

If you want to customize the generation of the TOC component from the main page(a simplified TOC because it contains only two levels from the documentation hierarchy) you have to take a look at the template

Code: Select all

<!--
    Template used to expand the whc:webhelp_tiles component.
-->
<xsl:template match="whc:webhelp_main_page_toc" mode="copy_template">

from the stylesheet:

Code: Select all

com.oxygenxml.webhelp/xsl/dita/responsive/mainPageComponentsExpander.xsl


In case when you want to customize the generation of the side TOC component(component which is generated for each topic and it is not available in the main page), you have to look at the generateSideToc named template from com.oxygenxml.webhelp/xsl/dita/responsive/navigationLinks.xsl.

At the moment, only the selected chapter is displayed in the table of content. Can we have all chapters of the book in the TOC with only the active chapter being open?


I will register this requirement in our issue tracking system to be implemented in a future oXygen version. I think we could add a parameter that allows you to customize the side TOC generation:
- an option to generate also all chapters(topics) from the first level;
- an option to generate only the selected topic with its children;
- an option to generated the selected topic with its children and siblings.
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
B-E-N
Posts: 94

Re: Customizing WebHelp Responsive: Menu left / All chapters in TOC

Wed Aug 31, 2016 1:08 pm

radu_pisoi wrote:I will register this requirement in our issue tracking system to be implemented in a future oXygen version. I think we could add a parameter that allows you to customize the side TOC generation:
- an option to generate also all chapters(topics) from the first level;
- an option to generate only the selected topic with its children;
- an option to generated the selected topic with its children and siblings.


That sounds perfect. Is it possible to give me a timeline for the implementation?

The thing is, we need this pretty soon. My tries to fix it in the navigationLinks.xsl failed so far. Could you tell me more specifically what I have to change in the Template to generate side TOC?
radu_pisoi
Posts: 307
Location: Craiova

Re: Customizing WebHelp Responsive: Menu left / All chapters in TOC

Wed Aug 31, 2016 4:45 pm

B-E-N wrote:Is it possible to give me a timeline for the implementation?

The issue to extend the generation of the side TOC is not scheduled for the next oXygen version which will be available about the middle of October.

radu_pisoi wrote: Could you tell me more specifically what I have to change in the Template to generate side TOC?

Please contact us on support@oxygenxml.com to give you a patch for this request.
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
B-E-N
Posts: 94

Re: Customizing WebHelp Responsive: Menu left / All chapters in TOC

Thu Sep 01, 2016 12:33 pm

Thanks for supplying a patch for this. It works great. All chapters are now available in the side toc.
Costin
Posts: 265

Re: Customizing WebHelp Responsive: Menu left / All chapters in TOC

Tue Nov 14, 2017 4:15 pm

Hi everyone,

Just to update this thread, the patch we offered in the past does not apply anymore and is no longer needed, as we have since implemented this functionality in oXygen.
Starting with version 19.1 of oXygen XML, one can now control which links to be present in the side TOC from the generated output, using the "webhelp.side.toc.links" parameter that we made available for the WebHelp Responsive transformation.
To display all the links in the side TOC, you should just change the parameter value from "Chapter" (which is the default setting) to "All".
The accepted values are documented in the parameter editing dialog from the scenario configuration as well as in our User-Guide.

Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support

Return to “DITA (Editing and Publishing DITA Content)”

Who is online

Users browsing this forum: No registered users and 1 guest