Page 1 of 1

Auto-generate list of links to child topics

Posted: Fri Dec 29, 2017 12:43 am
by protl
Is there an Oxygen feature or DITA element that can be inserted in a topic so that output automatically shows a list of links to child topics (based on the nested topicref elements in the .ditamap file), regardless of which .ditamap file is used to generate the output?

Re: Auto-generate list of links to child topics

Posted: Fri Dec 29, 2017 12:11 pm
by radu_pisoi
Hi,

If you are using the WebHelp Responsive output, you can use the webhelp.show.child.links=yes parameter to generate child links in the output for all topics that have subtopics.

See more in our documentation:
https://www.oxygenxml.com/doc/versions/ ... hild.links

Re: Auto-generate list of links to child topics

Posted: Fri Dec 29, 2017 4:48 pm
by protl
Is there something similar for PDF/print output? Thanks for the suggestion. Forgot one thing: I'd like to be able to show this list of links for some parent topics only, not all of them (so a setting that creates a list of links in all topics with child topics would not be a good option.)

Re: Auto-generate list of links to child topics

Posted: Fri Dec 29, 2017 5:28 pm
by radu_pisoi
Hi,

For the PDF output, you can use the args.rellinks=all parameter to specify which links to include in the output. See mode details in the DITA-OT documentation:
http://www.dita-ot.org/dev/parameters/p ... -base.html

The args.rellinks parameter will affect the links generated for all topics. If you want to control the generated links for some topics only, then you need to create a PDF customization plugin that allows you to override the XSLT templates used to generate links. See the Customizing PDF output topic from the DITA-OT documentation:
http://www.dita-ot.org/dev/topics/pdf-c ... ation.html

In short, you can use the outputclass attribute to mark topics that you want to customize. Next, in XSLT extensions, you can verify the value of the outputclass attribute and generate the links as you need.

Re: Auto-generate list of links to child topics

Posted: Fri Dec 29, 2017 6:40 pm
by protl
Thanks again Radu. I was hoping for a simpler solution, similar to the "Insert miniTOC proxy" feature in Flare. I did try your suggestion, and the default rellinks lists that appeared showed some content that I would like to hide (the page number, the shortdesc), and it also showed a link for a topic that is being excluded from the output based on attributes (product="x"). Is there a way to format the rellinks appearance to hide things such as the page number? Regarding the link to excluded content, would that be a bug, or would the rellinks component need to be modified to hide links to excluded content?

Re: Auto-generate list of links to child topics

Posted: Tue Jan 09, 2018 9:58 am
by Radu
Hello Laura,

About these questions:

Is there a way to format the rellinks appearance to hide things such as the page number?


There are various language-dependent configuration files like:

OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT2.x/plugins/org.dita.pdf2/cfg/common/vars/en.xml

in which you can search for "On the page" or "Page". You can for example remove the text content from one of those variables. These variables are later used in the XSLT processing which produces the XSL-FO document from which the final PDF will be generated.

Regarding the link to excluded content, would that be a bug, or would the rellinks component need to be modified to hide links to excluded content?


You would also need to add the same profiling filter in all places where the sometimes excluded topic is referenced (other topics or relationship table).

Regards,
Radu