srhinow / recurring_element
Manage recurring and seasonal content elements for Contao CMS.
Package info
gitlab.com/srhinow/recurring_element
Type:contao-bundle
pkg:composer/srhinow/recurring_element
2.0.0
2026-05-01 21:02 UTC
Requires
- php: >=8.2
- contao/core-bundle: >=5.3
Requires (Dev)
- contao/test-case: ^5.3
- friendsofphp/php-cs-fixer: ^3.0
- phpunit/phpunit: ^11.0
README
Manage recurring and seasonal content elements for Contao CMS — display different content based on date ranges with optional repetition.
Requirements
| Version | |
|---|---|
| PHP | >= 8.2 |
| Contao | >= 5.3 |
Installation
composer require srhinow/recurring-element-bundle
Concept
Each Recurring Element contains multiple Items with a date range and optional repetition interval. The frontend module displays the item with the highest priority that is currently active.
Recurring Element (tl_recurring_element)
└── Items (tl_recurring_element_items)
├── startDate / endDate
├── optional repetition (repeatEach, recurrences)
├── optional image
├── optional text / headline
└── priority (highest-priority active item wins)
Usage
- Create a Recurring Element in the backend (Content → Recurring Elements)
- Add items with date ranges and optional repetition
- Add the "Recurring Element: Current Item" frontend module to your page layout
- Select the recurring element and optionally a custom template (
recel_*)
Template variables
| Variable | Description |
|---|---|
$this->element['imgPath'] | Path to the image file |
$this->element['alt'] | Image alt text |
$this->element['caption'] | Image caption |
$this->element['cssClass'] | CSS class |
$this->element['addText'] | Whether text is set |
$this->element['headline'] | Headline (serialized inputUnit) |
$this->element['text'] | Rich text content |
Development
./vendor/bin/phpunit
./vendor/bin/php-cs-fixer fix