Page 1 of 1
Chunked topic title not appearing as Page TOC on right pane
Posted: Tue Jan 17, 2023 10:39 am
by ejsumi
Hi Team,
For the webhelp output, we use the chunk 'to content' attribute for some topics, to have a combined output page.
When there is only one child topic, it does not show the "On this page" pane. But if there are 2 or more topics chunked, "On this page" pane appears.
I am using Oxygen XML 23.1
I want the web help output to show the child topic in "On this page" pane, even if it only one topic.
How can it be achieved?
Thanks,
Sumi
Re: Chunked topic title not appearing as Page TOC on right pane
Posted: Tue Jan 17, 2023 1:06 pm
by Costin
Hi,
Indeed, that is intended behavior. As also described in the
topic toc component's description in the WebHelp Responsive User-Guide:
This component is generated for any topic that contains at least two <section> elements and each <section> must have an @id attribute.
Most probably, that structure could be modified through an XSLT customization of your own.
You can find
here more information on how to customize using XSLT.
Regards,
Costin
Re: Chunked topic title not appearing as Page TOC on right pane
Posted: Tue Jan 17, 2023 2:42 pm
by chrispitude
Hi Sumi,
Adding to what Costin said, if you inspect the WebHelp topic structure, you will see an HTML structure like this, with an
@id of
wh_topic_toc:
Code: Select all
<nav role="navigation" id="wh_topic_toc" aria-label="On this page" class="col-lg-2 d-none d-lg-block navbar d-print-none">
<div id="wh_topic_toc_content">
<div class=" wh_topic_toc ">
<div class="wh_topic_label">On this page</div>
<ul>...</ul>
</div>
</div>
</nav>
Then if you search the WebHelp plugin directory for this value, you will see a template like this in
topicComponentsExpander.xsl:
Code: Select all
<!-- Expand 'webhelp_topic_toc' place holder. -->
<xsl:template match="whc:webhelp_topic_toc" mode="copy_template">
...
<xsl:if test="count($generate_topic_toc/ul/descendant::li) > 1">
...
</xsl:if>
...
</xsl:template>
I think if you made a plugin that overrode this template with a copy except for the "
count() > 1" test changed to "
count() >= 1", you should get what you want. You would need to identify the right extension point, etc.
Re: Chunked topic title not appearing as Page TOC on right pane
Posted: Thu Jan 19, 2023 7:01 am
by ejsumi
Thanks for the inputs, will try it out.