logo

Extra Block Types (EBT) - New Layout Builder experience❗

Extra Block Types (EBT) - styled, customizable block types: Slideshows, Tabs, Cards, Accordions and many others. Built-in settings for background, DOM Box, javascript plugins. Experience the future of layout building today.

Demo EBT modules Download EBT modules

❗Extra Paragraph Types (EPT) - New Paragraphs experience

Extra Paragraph Types (EPT) - analogical paragraph based set of modules.

Demo EPT modules Download EPT modules

Scroll

How to display a list of products in an accordion?

22/02/2025, by Anonymous (not verified)
Forums

Hello! I've encountered a problem. I can't find anywhere how to display new products in an accordion format.
That is: there is a view with new products that is displayed on the homepage. I need it so that when you click the "Show more new products" button, the full list of new products expands like an accordion. In other words, when you click the button, it moves down and reveals more products.
It's clear that I need to use the Accordion module, but I can't figure out how to use it in this case.
Can anyone help? Has anyone faced such a task?

I was advised to output the necessary information into the required blocks using Views, for example, andjQuery(this).toggle("fast");  

And this is how to show/hide "New Products".

But I don't know how to do this since I've only been working with Drupal for a week. I also don't know what to write where and how. Whether I need to create a js file or install some module to apply these codes to the block.

Please help.