-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collapsible nav-toc does not work when the map using "chunk=to-content" attribute #52
Comments
That is a bug. There needs to be some defensive code added to avoid it. Just add + <xsl:when test="not(.)">
+ </xsl:when>
<xsl:when test="normalize-space($title)">
<xsl:variable name="id" select="dita-ot:generate-html-id(.)"/> At line 561 of nav.xsl like this |
Note that there is still a timing problem with using a side-toc with |
Thank you. I have added it as you adviced, but it seemed that there are no significant changes in the output. |
I did find that question. With |
If you are still getting errors of the form:
Then the issue will still occur. However just rendering ordinary |
I haven't met this issue, and I am just confused that the selected nav-toc cannot be set "active" anymore, so I come here to ask you if I can modify some lines to make it work normally as it is transformed without |
Only take the `id` after the `#` when generating the connected xref button.
You can see a working chunked example here: https://jason-fox.github.io/dita-bootstrap/Chunk2050729693.html I created it from the This was created by altering the ditamap - <chapter>
+ <chapter chunk="to-content">
...
- <chapter>
+ <chapter chunk="to-content">
... etc. https://jason-fox.github.io/dita-bootstrap/Chunk1343199979.html demonstrates the timing bug. Nav works eventually, but the DOM needs to complete loading. |
Thank you, I have wrote a javasript for the sibebar-nav to make nav item can be positioned and highlighted automatically when the topic is on the current screen. And I am now considering embeding it to the plugin; how can I chieve that please?
在 2022-09-06 14:13:28,"Jason Fox" ***@***.***> 写道:
You can see a working chunked example here: https://jason-fox.github.io/dita-bootstrap/Chunk2050729693.html I created it from the feature/5.2 branch. The collapsible nav now works as do the collapse and offcanvas components.
This was created by altering the ditamap
- <chapter>+ <chapter chunk="to-content">
...
- <chapter>+ <chapter chunk="to-content">
... etc.
https://jason-fox.github.io/dita-bootstrap/Chunk1343199979.html demonstrates the timing bug. Nav works eventually, but the DOM needs to complete loading.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Hi, @infotexture
I applied
@chunk="to-content"
to the map in order to generate a single html. However, I found that the collapsible nav-toc did not work. In specific, the nav-toc item of current topic cannot be highlighted.I have figured it out that this is because the class "active" cannot be added to the current nav item in this kind of transformation, but I have no idea on how to modify it to make the collapsible nav-toc compatible with single html output.
Could you please give me some suggestions?
The text was updated successfully, but these errors were encountered: