Accordion

Posted: 2016-11-08 in 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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s