- Issue created by @AlfTheCat
- First commit to issue fork.
- Assigned to cecrs
- Status changed to Needs review
9 months ago 6:34pm 6 March 2024 - πΊπΈUnited States cecrs
I ran into this issue too, as well as needing to apply the accordion checkout to a custom checkout flow that my site uses. I've added module configuration for both.
To configure: /admin/commerce/config/accordion
NB: In order to solve the issue with the template, I added a configuration to use/not use the default template. If checked, the module will use the details.html.twig provided by the module. If unchecked, Drupal will determine which template to use in the usual way, and this modules template will NOT be used. If you use this configuration, you MUST provide a custom template in your theme, that checks for the new accordion attribute, and selects a template accordingly.
It should look like so:
{% if attributes.accordion is defined and attributes.accordion == true %} < This is an accordion details pane. Insert the template code provided by the module here, it is needed for the module to work correctly. > {% else %} {# For all other details elements, use the correct template. I copied the one from my base theme into my subtheme and renamed it to detailsDefault.html.twig to avoid namespace conflicts #} {% include '@mytheme/form/detailsDefault.html.twig' %} {% endif %}