Accordion

Permalink Browser Info Environment
Hi Jordan,

Thanks for this excellent addon.

Is there a way to add other blocks in to it? I basically need to add an accordion, such as remo's Expand/Collapse addon (which we used previously).

The reason we can't just add it below the DC block is because we need any blocks created in the main area are wrapped to have a white box background. We previously used a stack but the group of blocks needed to be used (with different content inside) on different pages, so obviously changing the block's content was changing it globally instead of locally. The DC block allows us to have the H3, H4, paragraph and button that we need but without the accordion we used to have between the paragraph and the button.

Type: Discussion
Status: New
maze
View Replies:
jordanlev replied on at Permalink Reply
jordanlev
The only way to achieve that with designer content is to pick an arbitrary number of panels for the accordion (for example, if you know there will never be more than 5 of them)... and add 5 sets of fields to the custom block. Then customize the block's view.php template to split all those fields out into their various accordion panels.

But that is not a very elegant solution. The method I prefer to achieve this kind of thing (if you're on Concrete 5.6) is this customization I made called "block wrapper templates", so you can wrap every block in an area in the necessary markup for the accordion:
https://github.com/jordanlev/c5_block_wrapper_templates...

Best of luck!

-Jordan
maze replied on at Permalink Reply
maze
Excellent, I'll give it a try.

Thanks Jordan!

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.