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

Re: Auto-generate list of links to child topics

Posted: Wed Jun 15, 2022 8:53 am
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.

Re: Auto-generate list of links to child topics

Posted: Wed Jun 15, 2022 9:30 am
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

Re: Auto-generate list of links to child topics

Posted: Wed Jun 15, 2022 12:26 pm
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.

Re: Auto-generate list of links to child topics

Posted: Mon Jun 20, 2022 12:41 pm
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

Re: Auto-generate list of links to child topics

Posted: Mon Jun 27, 2022 8:08 am
by g_m
Thank you for your help :)