Page 1 of 1
Collapse an element
Posted: Tue Mar 07, 2023 1:09 pm
by luodan
Hi there,
Is there an option to collapse specific elements? Sometimes a section or block of code is too large and I expect that by default in the output html page it is collapsed and the user can click to open it.
Re: Collapse an element
Posted: Wed Mar 08, 2023 1:57 pm
by cosmin_andrei
Hello,
We already have a feature request logged in our internal tracking system to add this functionality in a future version, so I've just added your vote for it and we will notify this thread when/if a new implementation becomes available.
Re: Collapse an element
Posted: Wed Mar 08, 2023 2:03 pm
by luodan
OK, thanks, looking forward to this new function.
Re: Collapse an element
Posted: Wed Mar 08, 2023 4:14 pm
by InspectorSpacetime
Just mentioning...
The DITA Bootstrap plugin lets you create
collapsible elements.
And of course with Oxygen WebHelp, sections that have a title are automatically transformed into collapsible sections that can include codeblocks or other elements.
Re: Collapse an element
Posted: Tue Jan 07, 2025 4:28 pm
by lmimbor
Hi
Has there been any progress in implementing the collapsible element mentioned in the original post?
Rgds
Re: Collapse an element
Posted: Thu Jan 16, 2025 1:15 pm
by julien_lacour
Hello,
The collapsible elements implementation is still under development and not available yet.
But the WebHelp Responsive plugin uses Bootstrap under the hood so it is possible to add the correct attributes and change their values dynamically to obtain a collapsible behavior on an element:
https://getbootstrap.com/docs/4.6/components/collapse/
You can create a publishing template and using XSLT or JavaScript add the attributes so the content will be displayed collapsed and a button can expand it.
For more information you can check the following topics from our user guide:
Regards,
Julien