I am using views bootstrap to create an accordion of content grouped by category. I would like for each category to function as an accordion as well as each item listed.
I've seen some requests for this feature in the Drupal 7 issue queue. I don't think any of these issues really provide any guidance at this stage.
https://www.drupal.org/project/views_bootstrap/issues/2368953 (D7)
https://www.drupal.org/project/views_bootstrap/issues/2794563 (D7)
https://www.drupal.org/project/views_bootstrap/issues/2820666 (D8)
I think that the solution looks something like this:
- Determine whether or not view is "grouping" content
- Change markup in template file if content is being grouped
views_bootstrap/views-bootstrap-accordion-plugin-style.tpl.php
Questions:
- Do we need to provide configuration option for user to decide whether or not the "category" or the "node" has the accordion applied to it? Or do we just assume that both get accordions.
I think we start by just assuming that both levels are accordions and then think about adding configuration later.
NOTE: Here is a link to sample markup for nested accordions. https://codepen.io/marklsanders/pen/OPZXXv
I am using views bootstrap to create an accordion of content grouped by category. I would like for each category to function as an accordion as well as each item listed.
I've seen some requests for this feature in the Drupal 7 issue queue. I don't think any of these issues really provide any guidance at this stage.
https://www.drupal.org/project/views_bootstrap/issues/2368953 (D7)
https://www.drupal.org/project/views_bootstrap/issues/2794563 (D7)
https://www.drupal.org/project/views_bootstrap/issues/2820666 (D8)
I think that the solution looks something like this:
views_bootstrap/views-bootstrap-accordion-plugin-style.tpl.php
Questions:
I think we start by just assuming that both levels are accordions and then think about adding configuration later.
NOTE: Here is a link to sample markup for nested accordions. https://codepen.io/marklsanders/pen/OPZXXv