Skip to content

Can we support nested accordions (grouped content) #21

@stpaultim

Description

@stpaultim

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions