Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/heimrichhannot/contao-teaser-bundle
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.
https://github.com/heimrichhannot/contao-teaser-bundle
Last synced: about 1 month ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/heimrichhannot/contao-teaser-bundle
- Owner: heimrichhannot
- Created: 2018-08-14T07:02:32.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-04-22T12:11:33.000Z (8 months ago)
- Last Synced: 2024-04-25T04:02:09.924Z (8 months ago)
- Language: PHP
- Size: 524 KB
- Stars: 0
- Watchers: 5
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Contao Teaser Bundle
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.![Teaser Frontend](docs/img/contao-teaser-bundle_screenshot_frontend.png)
![Teaser Backend](docs/img/contao-teaser-bundle_screenshot_backend.png)
## Usage
### Install
Prerequisites:
* Contao ^4.9 Managed edition
* PHP ^8.1Install 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.
### Upgrade from older versions
See [Upgrade introductions](UPGRADE.md)