markocupic / contao-heroimage-bundle
Add a hero image element to the Contao frontend.
Package info
github.com/markocupic/contao-heroimage-bundle
Type:contao-bundle
pkg:composer/markocupic/contao-heroimage-bundle
Requires
- php: ^8.1
- contao/core-bundle: ^5.3 || ^6.0
- symfony/config: ^6.4 || ^7.0 || ^8.0
- symfony/dependency-injection: ^6.4 || ^7.0 || ^8.0
- symfony/http-foundation: ^6.4 || ^7.0 || ^8.0
- symfony/http-kernel: ^6.4 || ^7.0 || ^8.0
Requires (Dev)
- contao/manager-plugin: ^2.12
- contao/test-case: ^5.3 || ^6.0
Suggests
None
Provides
None
Conflicts
- contao/manager-plugin: <2.0 || >=3.0
Replaces
None
README
Contao hero image
This extension adds a hero image content element to the contao CMS.
Requirements
- PHP 8.1 or higher (Contao 6 requires a more recent PHP version)
- Contao 5.3 or Contao 6
Contao 4.13 is no longer supported. Please use version 1.x of this extension for Contao 4.13.
Templates
The content element uses the modern Twig template content_element/heroimage_element.html.twig.
Version 2 replaces the legacy template ce_heroimage_element. If you have created a custom template
(e.g. templates/ce_heroimage_element_custom.html.twig), you have to recreate it as a variant of the new
template (e.g. templates/content_element/heroimage_element/custom.html.twig):
{% extends "@Contao/content_element/heroimage_element.html.twig" %}
{% block content %}
{{ parent() }}
{% endblock %}
The template variables heroImagePreline, heroImageHeadline, heroImageText, heroImageButtonText,
heroImageButtonClass, href, heroContentboxOpacity and backgroundStyle are still available.
New variables are text_align, background_color and background_image. Use element_css_classes
instead of class.

