Collapse an element

Post here questions and problems related to editing and publishing DITA content.
luodan
Posts: 19
Joined: Wed Aug 24, 2022 7:20 am

Collapse an element

Post 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.
cosmin_andrei
Posts: 143
Joined: Mon Jun 12, 2017 10:50 am

Re: Collapse an element

Post 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.
Regards,
Cosmin
--
Cosmin Andrei
oXygen XML Editor and Author Support
luodan
Posts: 19
Joined: Wed Aug 24, 2022 7:20 am

Re: Collapse an element

Post by luodan »

OK, thanks, looking forward to this new function.
InspectorSpacetime
Posts: 38
Joined: Thu Jul 29, 2021 12:02 pm

Re: Collapse an element

Post 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.
Last edited by InspectorSpacetime on Wed Mar 08, 2023 4:17 pm, edited 1 time in total.
lmimbor
Posts: 1
Joined: Tue Jan 07, 2025 4:24 pm

Re: Collapse an element

Post by lmimbor »

Hi
Has there been any progress in implementing the collapsible element mentioned in the original post?

Rgds
julien_lacour
Posts: 615
Joined: Wed Oct 16, 2019 3:47 pm

Re: Collapse an element

Post 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
Post Reply