backdrop-contrib / views_bootstrap

This module provides a set of styles for the Views module. It allows you to create responsive Bootstrap 3.x components, such as grids, carousels, tabs, and tables, all within the configuration settings of the powerful Views module.
https://backdropcms.org/project/views_bootstrap
GNU General Public License v2.0
0 stars 7 forks source link

Can we support nested accordions (grouped content) #21

Open stpaultim opened 5 years ago

stpaultim commented 5 years ago

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:

1) Determine whether or not view is "grouping" content 2) Change markup in template file if content is being grouped views_bootstrap/views-bootstrap-accordion-plugin-style.tpl.php

Questions:

1) 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

stpaultim commented 5 years ago

We've written a patch/pull request for this that includes config for "nest accordions"?

Need to think about how we've done it and whether or not it will work for most users.

We also need to check and make sure that this is compatible with previous releases of this module.

stpaultim commented 3 years ago

So, there is actually not a PR for this, but there is a branch. I tried to create a PR against the current version of the module, but failed. I hope to try again.