定制 heimrichhannot/contao-enhanced-accordions-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

heimrichhannot/contao-enhanced-accordions-bundle

最新稳定版本:0.1.1

Composer 安装命令:

composer require heimrichhannot/contao-enhanced-accordions-bundle

包简介

This bundle enhances contao accordions.

README 文档

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

screenshot.png

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.

Variable Description
accordion_parentId (int) The id of the first element of the accordion group.
accordion_first (bool) true if the element is the first element of the group.
accordion_last (bool) true if the element is the last element of the group.

统计信息

  • 总下载量: 459
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 6
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-3.0-or-later
  • 更新时间: 2023-12-04