Multi-level accordion

Hello all,

I am wondering how I can do a multi-level accordion view for an FAQ. Talking about the below page,
https://fap-dep.web.cern.ch/acc/accounts-payable

The FAQ at the bottom is behaving exactly how I want, meaning being able to collapse a whole category. However, when opening them, the questions are displaying in a super ugly format. Is there a way I could have them showing like below ?

Many thanks in advance,
Benjamin

Dear Benjamin

I don’t have all the elements to suggest a solution.
We use “jQuery UI accordion” in the views to generate an accordion, you can see it in:

https://alice-figure.web.cern.ch/grp_prel_fig_pub

In our experience
1-) Format the content to display in the view,
2-) Adjust the values in the css to obtain an optimal result.

best regards
Guillermo

Hello Guillermo,

Many thanks for getting back to me. I also use the jQuery UI accordion for my example and it works fine. What I am trying to achieve is to have a 2-level accordion meaning,

Level 1 - being able to collapse a whole category
Level 2 - being able to collapse each question within this category

I manage one or the other but not both.

Thank you,
Benjamin

Dear Benjamin

You can use a view within the view, check “Views Field View” module (Drupal 9 compatible!!!)

best regards
Guillermo

1 Like

Thank you Guillermo. I have installed the module, I now need to figure out how to use it.

Benjamin