Auto-generate list of links to child topics

Post here questions and problems related to editing and publishing DITA content.
protl
Posts: 13
Joined: Mon Dec 18, 2017 10:52 pm

Auto-generate list of links to child topics

Post 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?
radu_pisoi
Posts: 395
Joined: Thu Aug 21, 2003 11:36 am
Location: Craiova
Contact:

Re: Auto-generate list of links to child topics

Post 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
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
protl
Posts: 13
Joined: Mon Dec 18, 2017 10:52 pm

Re: Auto-generate list of links to child topics

Post 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.)
radu_pisoi
Posts: 395
Joined: Thu Aug 21, 2003 11:36 am
Location: Craiova
Contact:

Re: Auto-generate list of links to child topics

Post 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.
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
protl
Posts: 13
Joined: Mon Dec 18, 2017 10:52 pm

Re: Auto-generate list of links to child topics

Post 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?
Radu
Posts: 8092
Joined: Fri Jul 09, 2004 5:18 pm

Re: Auto-generate list of links to child topics

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
g_m
Posts: 4
Joined: Fri Apr 01, 2022 12:37 pm

Re: Auto-generate list of links to child topics

Post by g_m »

radu_pisoi wrote: 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
Hi,

I wonder if there is a way to have links show, but only as titles without short descriptions.
Radu
Posts: 8092
Joined: Fri Jul 09, 2004 5:18 pm

Re: Auto-generate list of links to child topics

Post by Radu »

Hi,
This forum thread was started about 4 years ago and it's a mix of HTML and PDF output customization advice. Can you maybe start a new thread with your question?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
chrispitude
Posts: 529
Joined: Thu May 02, 2019 2:32 pm

Re: Auto-generate list of links to child topics

Post by chrispitude »

I have a com.synopsys.mini-toc plugin here:

DITA-mini-toc-element

that lets you add a list introduction in any topic:

Code: Select all

<div outputclass="mini-toc">
  <p>The following topics provide information about the XYZ feature:</p>
</div>
and the plugin will add a list of child topic links after the introduction:

Code: Select all

<h1 class="title topictitle1" id="ariaid-title1">My Topic</h1>
<div class="body">
  <div class="div mini-toc">
    <p class="p">The following topics provide information about the XYZ feature:</p>
    <ul class="ul mini-toc-list">
      <li class="li"><a class="xref" href="topic.html#sub1">XYZ Feature #1</a></li>
      <li class="li"><a class="xref" href="topic.html#sub2">XYZ Feature #2</a></li>
    </ul>
  </div>
</div>
This can be used at any level of topic, not just chapters or other top-level topics.
Costin
Posts: 777
Joined: Mon Dec 05, 2011 6:04 pm

Re: Auto-generate list of links to child topics

Post by Costin »

Hi g_m ,

As it is HTML-based, the published WebHelp output is highly customizable through CSS, so you could most probably use your own CSS customization to match the specific <shortdesc> elements and hide them using CSS rules.
You can find more details on how to use CSS to customize your WebHelp publication in this section from the WebHelp User-Guide.

Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
g_m
Posts: 4
Joined: Fri Apr 01, 2022 12:37 pm

Re: Auto-generate list of links to child topics

Post by g_m »

Thank you for your help :)
Post Reply