Closed lakokkonen closed 10 months ago
@lakokkonen Thanks for reporting this issue. 🙏
Are you able to submit a pull request with the proposed changes?
@infotexture Sure, should I fork the repo and create the pull request from there?
@lakokkonen - Yes, that is the process I and others have used to make contributions here.
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.
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()*"/>