Nestable accordion: open all item by default

Hi,

A new feature to have all items open by default in a nestable accordion element would be great.

1 Like

Yes, first item, all item or option to pick which ones are open. Having an issue with this right now =\

Hi @diemos,

you have an option to expand items based on an index. Now, if you want to open all, you will have to write each one down.

Hope that helps,
Matej

1 Like

Hi @Matej,

Thanks for the screenshot. I didn’t know that was possible. But is there a way that applies to everyone? Because items may be called dynamically and in this situation they do not have a specific number.

For example, a value of -1 would cause all to be open.

1 Like

Thank you, kind of funny i literally just figured it out (entered “0” to expand first), and i just saw your reply. Thank you. Keep up amazing work!

Hi @Victor1999,

No, sadly there is no way to open all of them. You probably know how much element will be max there, right? And if that’s the case, you can just type in all the indexes, and it will open all of them. And if the accordion will have less elements than the indexes that you entered, they should be just ignored.
Please try and let me know if this works for you.

Hi @diemos,

I’m glad that you figured it out :wink: Thanks for nice words!

Best regards,
Matej

Hi @Matej,

This is not always the case. Let’s say we have a cpt whose content we display using an accordion. In this case, every time we add a post, we have to go to the builder and add an item to the Expand item indexes control. It doesn’t seem logical.

Please try and let me know if this works for you.

I’m not really a coder and I don’t know if it’s possible to implement it or not. But it’s much easier to achieve the desired result with just one option than something like this: 0,1,2,3,4,5,6,7…

BricksExtras’ Pro Accordion has this option.

Of course it’s possible to add it, but it’s just not implemented, so I’ve suggested the next best solution.
Let’s say you will not have more than 15 elements, so just add 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 inside, and it should work. But if you have more than 15, then yep, you need to add more, but that’s the current solution.

Matej