Project

General

Profile

Actions

Feature #88921

closed

New Event in the PageLayoutView Class to enrich Content into the Columns in the BackendLayout

Added by Volker Kemeter over 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2019-08-05
Due date:
% Done:

100%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

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);
        }
    }
}

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #95261: SectionMarkupGenerated events are not working in fluid based page moduleClosedOliver Bartsch2021-09-17

Actions
Actions #1

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

Actions #2

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

Actions #3

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.

Actions #4

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

Actions #5

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

Actions #6

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

Actions #7

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

Actions #8

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

Actions #9

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

Actions #10

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

Actions #11

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

Actions #12

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

Actions #13

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

Actions #14

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

Actions #15

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

Actions #16

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

Actions #17

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

Actions #18

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

Actions #19

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

Actions #20

Updated by Volker Kemeter almost 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #21

Updated by Benni Mack over 4 years ago

  • Status changed from Resolved to Closed
Actions #22

Updated by Josef Glatz over 4 years ago

  • Description updated (diff)
Actions #23

Updated by Oliver Bartsch about 3 years ago

  • Related to Bug #95261: SectionMarkupGenerated events are not working in fluid based page module added
Actions

Also available in: Atom PDF