Page 1 of 1

Create TOC links to child elements of topic

Posted: Sat May 22, 2021 3:16 am
by daryl
Hi,

Is it possible for the Webhelp Responsive Output to generate a second level TOC page for all the child dita files of a topic head?
To make it clear, I am trying to create a page that automatically generate links to all childs (child 1 and child 2) of topic 3 in the output.
Screen Shot 2021-05-21 at 5.14.53 PM.png
Screen Shot 2021-05-21 at 5.14.53 PM.png (15.72 KiB) Viewed 726 times

Thanks!

Re: Create TOC links to child elements of topic

Posted: Mon May 24, 2021 11:19 pm
by alin
Hello,

It is not possible to generate an HTML page for a <topichead> entry. According to DITA Specification:
The <topichead> element provides a title-only entry in a navigation map, which should appear as a heading when the map is rendered as a table of contents. In print contexts it should also appear as a heading in the rendered content.
However, the Oxygen WebHelp Responsive output features a special component called Child Links that you could use to generate a second level TOC page.
For each topic, this component renders the links of the topic's direct children (according to the current DITA Map hierarchy). This component can be enabled by setting the webhelp.show.child.links parameter to yes.

You could obtain a second level TOC page in your output by following these steps:
  1. Instead of a <topichead>, use a <topicref> that references a topic with no content
  2. Create a custom Publishing Template
  3. Enable the Child Links component by setting the webhelp.show.child.links parameter to yes
  4. Add a custom CSS that styles the Child Links as tiles in order to obtain a similar layout with the one in the output's main page
You can use the following Publishing Template sample as an example for the workaround described above: https://github.com/oxygenxml/oxygen-pub ... with-tiles

You can use the following DITA map samples as input: Here is how the Child Links will be rendered when using the above Publishing Template:
Image

Regards,
Alin