Add option to use groups as accordion headers

Created on 21 March 2023, about 2 years ago
Updated 3 May 2023, almost 2 years ago

Problem/Motivation

When using grouping, it doesn't automatically mean, you want the grouped field as accordion header. Sometimes you want accordions below the groups.

But if you want the groups to become the accordion headers, this currently doesn't seem possible. So we need an option for that, which shows if grouping is enabled.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Needs work

Version

2.0

Component

Code

Created by

🇩🇪Germany Anybody Porta Westfalica

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Anybody
  • Assigned to Anybody
  • 🇩🇪Germany Anybody Porta Westfalica
  • @anybody opened merge request.
  • 🇩🇪Germany Anybody Porta Westfalica

    Okay, I played around a bit, but this won't be too easy to solve.

    The point is, that IF the setting (grouping_accordion_title) IS enabled, we may not do all the transformations in ...-view-fields.html.twig and instead should just use the regular version there. Instead we have to use {{ title }} as accordion title and the row content as accordion content in views-accordion-foundation-view.html.twig.

    So presumably it might be better to solve parts in PHP by switching the themes / theme suggestions if the option is set and use totally different theme files then. That would also make the twig files easier to read.

    For now I'll postpone this, until we really need it.

  • Issue was unassigned.
  • Status changed to Needs work almost 2 years ago
  • 🇩🇪Germany Anybody Porta Westfalica

    Just for the records: Ran into this again in the next project... not that unimportant feature ;)

Production build 0.71.5 2024