Content element and form field for Contao to generate a simple hr (horizontal rule). Simply choose the element type "divider" and save.
See the demo here: https://demo.clickpress.de/index.php/divider.html
- PHP 8.1+
- Contao 5.3 or Contao 6
Use version 1.x for Contao 4.
Install with the Contao Manager or with Composer:
composer require stefansl/contao-divider-bundle| Element | Template |
|---|---|
| Content element | content_element/divider.html.twig (wrapper class content-divider) |
| Form field | form_divider.html.twig |
The content element is a fragment controller with a modern Twig template. Its
wrapper used to have the class ce_divider, it now has the class
content-divider like all Contao 5 content elements. Custom variants of the
template go into templates/content_element/divider/.
- The legacy templates
ce_divider.html5andform_divider.html5have been replaced by Twig templates. Convert your customized templates. - Adjust CSS that targets
.ce_dividerto.content-divider. - The classes
StefanSl\DividerBundle\ContentDividerandStefanSl\DividerBundle\WidgetDividerhave been replaced byStefanSl\DividerBundle\Controller\ContentElement\DividerControllerandStefanSl\DividerBundle\Widget\FormDivider.