heimrichhannot / contao-teaser-bundle
A contao teaser content element, that provides the ability to link the element with pages, articles, files, downloads or external urls.
Installs: 4 832
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 5
Forks: 2
Open Issues: 2
Type:contao-bundle
Requires
- php: ^8.1
- contao/core-bundle: ^4.13 || ^5.0
- doctrine/dbal: ^2.13 || ^3.0
- heimrichhannot/contao-utils-bundle: ^2.28 || ^3.0
- symfony/dependency-injection: ^5.4 || ^6.0 || ^7.0
- symfony/security-core: ^5.4 || ^6.0 || ^7.0
Requires (Dev)
- contao/contao-rector: dev-main
- contao/manager-plugin: ^2.13
- phpstan/phpstan: ^2.1
- phpstan/phpstan-symfony: ^2.0
- rector/rector: ^2.0
- symplify/easy-coding-standard: ^12.5
Replaces
- dev-master
- 2.3.0
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.0
- 2.0.12
- 2.0.11
- 2.0.10
- 2.0.9
- 2.0.8
- 2.0.7
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 1.5.0
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.1
- 1.0.0
- 0.3.2
- 0.3.1
- 0.3.0
- 0.2.1
- 0.2.0
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- dev-fix/22
- dev-feature/more_custom_link_options
This package is auto-updated.
Last update: 2025-03-05 10:28:43 UTC
README
Teaser is a contao content element, that provides the ability to link the element with pages, articles, files, downloads and external urls. Can be used as replacement for ce_page_teaser.
Features
- Custom text and css-class for more link
- Link the whole article
- Hide more link, link entire element.
- Overwrite content template
- migration command from ce_page_teaser module and older versions.
Usage
Install
Prerequisites:
- Contao ^4.9 Managed edition
- PHP ^8.1
Install with composer:
composer require heimrichhannot/contao-teaser-bundle
Update the database afterwards.
Developers
Templates
- Element template prefix:
ce_linkteaser_
. - Image template prefix:
linkteaser_content_image_
.
Hooks
Name | Arguments | Expected return value | Description |
---|---|---|---|
generateTeaserLink |
$element: LinkTeaserElement, $showMore: bool | $showMore: bool | Add custom teaser source and modify the content element. |
getContentSourceOptions |
$options: array, $dc: DataContainer | $options: array | Add custom source options to the dca. |
Add custom text for more link
Just add your custom text in the default contao translation file within $GLOBALS['TL_LANG']['MSC']['linkteaser']['teaserlinktext']
. Afterwards (maybe you need to clear your cache) you can choose the new entry in the more link text field.