heimrichhannot / contao-blocks
Contao blocks bundle is a site-dependent container, that manipulates the visibility of elements.
Package info
github.com/heimrichhannot/contao-blocks
Language:JavaScript
Type:contao-bundle
pkg:composer/heimrichhannot/contao-blocks
2.3.0
2026-05-27 07:40 UTC
Requires
- php: ^8.2
- contao/core-bundle: ^5.3
- symfony/http-kernel: ^6.4 || ^7.0
Requires (Dev)
- contao/contao-rector: dev-main
- rector/rector: ^2.2
This package is auto-updated.
Last update: 2026-05-27 07:40:40 UTC
README
Contao blocks module is a site-dependent container, that manipulates the visibility of elements.
Features
Hooks
| Name | Arguments | Expected return value | Description |
|---|---|---|---|
| renderCustomBlockModule | $objBlockModule, $strReturn | the rendered module as string | Add custom block module type rendering |
Modules
| Name | Description |
|---|---|
| ModuleBlock | Checks the visibility of the block on the current page and renders it according to his type (article, content, module) |
Help
Get auto_item title in breadcrumb
Due a limitation in contao it is not possible to set the auto_item title from the breadcrumb hook (instead the containing page is shown twice), so you need to change the mod_breadcrumb template instead:
// Find this lines: <?php if ($item['isActive']): ?> <li class="active<?php if ($item['class']): ?> <?= $item['class'] ?><?php endif; ?> last"><?= $item['pageTitle'] ?: $item['title'] ?></li> // Replace '<?= $item['pageTitle'] ?: $item['title'] ?>' with '{{page::pageTitle}}' <?php if ($item['isActive']): ?> <li class="active<?php if ($item['class']): ?> <?= $item['class'] ?><?php endif; ?> last">{{page::pageTitle}}</li>