Auto-generate list of links to child topics

protl
Posts: 13

Auto-generate list of links to child topics

Fri Dec 29, 2017 12:43 am

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?
radu_pisoi
Posts: 328
Location: Craiova

Re: Auto-generate list of links to child topics

Fri Dec 29, 2017 12:11 pm

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
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
protl
Posts: 13

Re: Auto-generate list of links to child topics

Fri Dec 29, 2017 4:48 pm

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.)
radu_pisoi
Posts: 328
Location: Craiova

Re: Auto-generate list of links to child topics

Fri Dec 29, 2017 5:28 pm

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.
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
protl
Posts: 13

Re: Auto-generate list of links to child topics

Fri Dec 29, 2017 6:40 pm

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?
Radu
Posts: 5689

Re: Auto-generate list of links to child topics

Tue Jan 09, 2018 9:58 am

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

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

Who is online

Users browsing this forum: No registered users and 0 guests