infotexture / dita-bootstrap

DITA Open Toolkit plug-in for HTML5 output with extensible Bootstrap style
https://infotexture.github.io/dita-bootstrap
Apache License 2.0
16 stars 10 forks source link

TOC items created as collapsible incorrectly #160

Closed lakokkonen closed 10 months ago

lakokkonen commented 10 months ago

ISSUE:

Using the collapsible nav-toc parameter, the TOC items are created with the collapsible chevron button even if the topicref only has children that are set as toc="no" in the DITA Map.

collapse_toc

In the image, the Product 1 and Product 2 have child topics that are set as toc="no".

So having any child topic will cause the nav item to be a collapsible one, even if there's nothing to collapse.

POSSIBLE SOLUTION:

I tried modifying the children parameter in the corresponding template in nav.xsl, and it seems to work:

<xsl:param name="children" select="*[contains(@class, ' map/topicref ')] [not(@toc = 'no')] [not(@processing-role = 'resource-only')]" as="element()*"/>

infotexture commented 10 months ago

@lakokkonen Thanks for reporting this issue. 🙏

Are you able to submit a pull request with the proposed changes?

lakokkonen commented 10 months ago

@infotexture Sure, should I fork the repo and create the pull request from there?

jason-fox commented 10 months ago

@lakokkonen - Yes, that is the process I and others have used to make contributions here.