Accordion

Q:
I’ve a page using Accordion, with 5 section.
I’ve enabled and configured the Navigation panel and all work fine.
I need to add a simple section (with “Exclude from accordion” option = true) that becomes visible only when I activate a specific section
A:
A page laid out as accordion sections only allows one section to be expanded at a time and any at the top that are excluded from the accordion. What you are trying to achieve cannot be done with an accordion as it will expand the selected section into the available space.
The only thing a page laid out in accordion sections allows is exclude at the top (for a header section) and then expand one section into the available space. Any attempts to hide or show sections that are part of the accordion will have unpredictable results.
A2:
Remove the accordion and manually control the sections.
Like so

Code:
Lianja.showDocument("section:section2?action=collapse")
Lianja.showDocument("section:section2?action=expand")

If you have 4 sections, and you want 2 to be expanded, you can code for that.
If you want only one to be expanded, and the rest collapsed, that will work too.
Using this code, you can create your own accordion.


Taking the Accordion one step further. Using the click event to move records in related sections.
Also added a nice transition to hide and show the accordion.
[HerbTube] “Lianja AccordionTransition” https://youtu.be/ADghbexFir4

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.