Feature #88921
closedNew Event in the PageLayoutView Class to enrich Content into the Columns in the BackendLayout
100%
Description
what¶
this event can be triggered to enrich content into any column in the BackendLayout. This content will be shown after the last content element. You can use business logics to show content in specific columns. e.g. for displaying content only in columns without any colpos.
why¶
i needed that to display records from another table in a column with no colpos. the editor is able to see records in exact that place, where the content is shown in the website.
usage¶
register the service in the Services.yaml file¶
# Register an Event for adding Content into BackendLayout Columns
YOUR\NameSpace\Backend\View\PageLayoutViewDrawEmptyColposContent:
tags:
- { name: event.listener,
identifier: 'emptyColposListener',
event: TYPO3\CMS\Backend\View\Event\AfterGeneratedColposMarkupEvent }
add your own service class¶
you can use in your own class as much business logic as you want. e.g. fetch data from a rest service and place it in the colpos of your needs.
class PageLayoutViewDrawEmptyColposContent
{
public function __invoke(AfterGeneratedColposMarkupEvent $event): void
{
if (!isset($event->getColumnConfig()['colPos'])) {
$content = <<<EOD
<div data-colpos="1" data-language-uid="0" class="t3-page-ce-wrapper">
<div class="t3-page-ce">
<div class="t3-page-ce-header">Empty Colpos</div>
<div class="t3-page-ce-body">
<div class="t3-page-ce-body-inner">
<div class="row">
<div class="col-xs-12">
This column has no "colPos". This is only for display Purposes. You can now fetch Data from somewhere else and display it right in this position.
</div>
</div>
</div>
<div class="t3-page-ce-footer">
<div class="t3-page-ce-info">KTHXBYE!</div>
</div>
</div>
</div>
</div>
EOD;
$event->setContent($content);
}
}
}
Updated by Gerrit Code Review over 5 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61442
Updated by Gerrit Code Review over 5 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61442
Updated by Daniel Siepmann over 5 years ago
This is a must have. With a very small change to the core (introducing a new event / hook) the following will become possible:
Integrators / Developers can provide a custom preview within colpos. They are able to enrich the user experience of editors and therefore improve the overall experience of TYPO3.
E.g. one could display some external data that is provided within an colpos through a web service. This allows to make the Pageview actually a page view. Also information from page properties might be displayed, and also editable through ViewHelper linking to the edit record.
Updated by Gerrit Code Review over 5 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61442
Updated by Gerrit Code Review over 5 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61442
Updated by Gerrit Code Review over 5 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61442
Updated by Gerrit Code Review almost 5 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61442
Updated by Gerrit Code Review almost 5 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61442
Updated by Gerrit Code Review almost 5 years ago
Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61442
Updated by Gerrit Code Review almost 5 years ago
Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61442
Updated by Gerrit Code Review almost 5 years ago
Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61442
Updated by Gerrit Code Review almost 5 years ago
Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61442
Updated by Gerrit Code Review almost 5 years ago
Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61442
Updated by Gerrit Code Review almost 5 years ago
Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61442
Updated by Gerrit Code Review almost 5 years ago
Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61442
Updated by Gerrit Code Review almost 5 years ago
Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61442
Updated by Gerrit Code Review almost 5 years ago
Patch set 16 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61442
Updated by Gerrit Code Review almost 5 years ago
Patch set 17 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61442
Updated by Gerrit Code Review almost 5 years ago
Patch set 18 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61442
Updated by Volker Kemeter almost 5 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset cac03881433654d01d8bdbc5022998f5f32561ee.
Updated by Oliver Bartsch about 3 years ago
- Related to Bug #95261: SectionMarkupGenerated events are not working in fluid based page module added