heimrichhannot / contao-enhanced-accordions-bundle
This bundle enhances contao accordions.
Installs: 370
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 6
Forks: 0
Open Issues: 0
Type:contao-bundle
Requires
- php: ^8.0
- contao/core-bundle: ^4.13 || ^5.0
- heimrichhannot/contao-frontend-framework-bundle: ^0.1
README
This bundle enhances the work with contao accordions for template designers and developers.
Features
- add additional variables to accordions templates to create templates groups
- optional bootstrap 5 enhancements for the default templates
- bundles bootstrap 5 accordion templates
Usage
Install
Install with composer or contao manager and update your database.
composer require heimrichhannot/contao-enhanced-accordions-bundle
Use bootstrap 5 integration
In your theme settings, select bootstrap 5 frontend framework and activate the checkbox "Adjust default template". This adds some css classes and markup to make the default work with boostrap 5 javascript component. This is no complete replacement, as the default templates can not completely adjust without overriding for bootstrap 5.
The bundle also provides bootstrap 5 accordion templates, that can be selected as custom template, copied to project or extended in your project templates.
If you extend the templates, there are some adjustments you can make:
{% extends "@Contao_HeimrichHannotEnhancedAccordionsBundle/ce_accordionStart_bs5.html.twig" %} {% set open_first = true %} {% set titleElement = 'h3' %}
{% extends "@Contao_HeimrichHannotEnhancedAccordionsBundle/ce_accordionStop_bs5.html.twig" %}
{% extends "@Contao_HeimrichHannotEnhancedAccordionsBundle/ce_accordionElement_bs5.html.twig" %} {% set open_first = true %} {% set titleElement = 'h3' %}
Additional template variables
The bundle adds additional variables to the accordion templates, that can be used to enhance your templates. A accordion group is defined by consecutively accordion start and stop elements OR single accordion elements.