0

I created a view block to display my content in a boostrap grid.

enter image description here

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&stacked=h

0

I think the Ajax Docs gives a pretty good example. Here are the pseudo steps:

  1. You render your view block with 5 elements with "read more" submit as a form. The wrapper is is "my-ajax-block".
  2. Clicking on the submit will create an ajax call (with help of built in ajax mechanism of Drupal).
  3. 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.
  4. And you just send back the ajax response which will override the "my-ajax-block" with the fetched content.
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy