How to create a drop-down block? I created a view block to display my content in a boostrap grid.



My question is simple:

How to create a "Header" in my view to create an "Accordion" link and display My content when I click on it?

I want to display on the link "Accordion", the number of elements of the view

I would like to do like this page, but with the contents of my view instead of the text :

https://www.w3schools.com/bootstrap/tryit.asp?filename=trybs_collapsible_accordion&amp;stacked=h
I think the Ajax Docs gives a pretty good example. Here are the pseudo steps:


You render your view block with 5 elements with "read more" submit as a form. The wrapper is is "my-ajax-block".
Clicking on the submit will create an ajax call (with help of built in ajax mechanism of Drupal).
You will make a call for all the items you need (50 pieces in your case), hopefully with the same service you provide the 5 one.
And you just send back the ajax response which will override the "my-ajax-block" with the fetched content.