Feature #88921

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

Added by Volker Kemeter 10 months ago. Updated about 2 months ago.

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

100%

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

Associated revisions

Revision cac03881 (diff)
Added by Volker Kemeter 4 months ago

[FEATURE] New PSR-14 events in the PageLayoutView class

Two new PSR-14 events are added in the PageLayoutView class.
Those events can be used to add content into any column of a
BackendLayout. You can use this for example to show some
content in a column without a colPos assigned.

Releases: master
Resolves: #88921
Change-Id: I9271a85220d725f5cfcdf5ce99adf871a50f6032
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61442
Tested-by: TYPO3com <>
Tested-by: Jörg Bösche <>
Tested-by: Steffen Frese <>
Tested-by: Richard Haeser <>
Reviewed-by: Jörg Bösche <>
Reviewed-by: Daniel Siepmann <>
Reviewed-by: Steffen Frese <>
Reviewed-by: Richard Haeser <>

Revision 00d15c21 (diff)
Added by Josef Glatz about 2 months ago

[DOCS] Complete the examples of AfterSectionMarkupGeneratedEvent

Releases: master
Resolves: #90990
Related: #88921
Change-Id: I9a3997bde020b500a1bd1a6712ae0e405001a452
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64110
Tested-by: Daniel Siepmann <>
Reviewed-by: Daniel Siepmann <>

History

#1 Updated by Gerrit Code Review 10 months 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

#2 Updated by Gerrit Code Review 10 months 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

#3 Updated by Daniel Siepmann 10 months 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.

#4 Updated by Gerrit Code Review 10 months 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

#5 Updated by Gerrit Code Review 10 months 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

#6 Updated by Gerrit Code Review 10 months 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

#7 Updated by Gerrit Code Review 6 months 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

#8 Updated by Gerrit Code Review 6 months 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

#9 Updated by Gerrit Code Review 6 months 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

#10 Updated by Gerrit Code Review 6 months 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

#11 Updated by Gerrit Code Review 6 months 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

#12 Updated by Gerrit Code Review 6 months 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

#13 Updated by Gerrit Code Review 6 months 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

#14 Updated by Gerrit Code Review 6 months 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

#15 Updated by Gerrit Code Review 6 months 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

#16 Updated by Gerrit Code Review 6 months 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

#17 Updated by Gerrit Code Review 6 months 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

#18 Updated by Gerrit Code Review 6 months 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

#19 Updated by Gerrit Code Review 5 months 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

#20 Updated by Volker Kemeter 4 months ago

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

#21 Updated by Benni Mack 3 months ago

  • Status changed from Resolved to Closed

#22 Updated by Josef Glatz about 2 months ago

  • Description updated (diff)

Also available in: Atom PDF