90024[FEATURE] Introduce HeaderData and FooterData ViewHelpers
Commit message
Review
-
Code review CR +2 Done
- Simon Praetorius +2
- Oliver Klee +1
-
Verified V +2 Done
- Simon Praetorius +2
- Oliver Klee +1
- core-ci +1 CI
Issues 1
Files 6
- typo3/sysext/core/Classes/Page/PageRenderer.php+1 −1
- typo3/sysext/core/Documentation/Changelog/14.0/Feature-107056-IntroduceHeaderDataAndFooterDataViewHelpers.rstnew+67 −0
- typo3/sysext/fluid/Classes/ViewHelpers/Page/FooterDataViewHelper.phpnew+53 −0
- typo3/sysext/fluid/Classes/ViewHelpers/Page/HeaderDataViewHelper.phpnew+44 −0
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Page/FooterDataViewHelperTest.php2new+52 −0
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Page/HeaderDataViewHelperTest.php2new+49 −0
Review log 2027
Show 12 earlier messages
-
Torben Hansen uploaded patch set 1 07/08/25, 13:07
-
core-ci voted on patch set 1 V +1 07/08/25, 13:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81491
-
Benni Mack commented on patch set 1 07/08/25, 14:40
Let's call it - page.headerData - page.footerData I also love to have - page.meta - page.title -
Benni Mack commented on patch set 1 07/08/25, 14:41
Should we include - "priority" - "identifier" similar to existing asset ViewHelpers? -
Torben Hansen uploaded patch set 2
V +107/09/25, 06:11 -
Torben Hansen commented on patch set 2 07/09/25, 06:13
Reply
The asset ViewHelper uses the asset collector, which is able to handle `priority` and `identifier`. The new ViewHelpers in this patch use plain `PageRenderer` functionality to add header- and footerData and just adds the viewHelpers content as is. AFAIK, `PageRenderer` has no functionality to control added header- or footerdata.Reply
I renamed both ViewHelpers and added the suggested new ViewHelpers to my list. -
core-ci voted on patch set 2 V +1 07/09/25, 06:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81515
-
Torben Hansen commented on patch set 2 07/10/25, 17:33
@benni@typo3.org We could also add a single a `<f:pageRenderer>` ViewHelper instead (we already have `<f:be.pageRenderer>` with mostly BE functionality for modules). The new `<f:pageRenderer>` viewHelper could provide some limited functionality of `PageRenderer` and have arguments like `addHeaderData`, `addFooterData` and `setPageTitle`. So basically one viewHelper for multiple purposes regarding the current oage rendering. What do you think? -
Torben Hansen commented on patch set 2 07/13/25, 10:17
Reply
I thought some time about the single viewHelper suggestion I made and came to the conclusion, that single viewHelpers fit better. Since `headerData` and `footerData` may include inline JS or multiple tags, it is better to use dedicated viewHelpers for both cases, so it is possible to use `renderChildren()`. -
Torben Hansen uploaded patch set 3
V +107/13/25, 10:44 -
core-ci voted on patch set 3 V +1 07/13/25, 10:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81656
-
Torben Hansen uploaded patch set 4
V +107/20/25, 11:55 -
core-ci voted on patch set 4 V +1 07/20/25, 12:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82011
-
Torben Hansen rebased onto patch set 5
V +108/02/25, 17:12 -
core-ci voted on patch set 5 V +1 08/02/25, 17:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82669
-
Oliver Klee voted on patch set 5 CR +1 V +1 08/03/25, 07:54
-
Simon Praetorius uploaded patch set 6
CR +1V +108/15/25, 13:28 -
Simon Praetorius commented on patch set 6 CR +1 V +1 08/15/25, 13:30
Reply
I also prefer separate ViewHelpers as they make the template more readable. Since we can always add more arguments, but not easily remove them, I'd suggest to start with the minimalistic approach and see if `priority` etc. will become necessary later. -
core-ci voted on patch set 6 V +1 08/15/25, 13:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83459
-
Jörg Bösche voted on patch set 6 CR +1 08/18/25, 11:36
-
Simon Schaufelberger commented on patch set 6 CR -1 08/20/25, 07:43
FooterDataViewHelperTest.php:26this ViewHelper doesn't need a database. please disable the database initializationHeaderDataViewHelperTest.php:26same here -
Torben Hansen uploaded patch set 7
CR +1V +108/20/25, 07:58 -
Torben Hansen commented on patch set 7 08/20/25, 07:59
FooterDataViewHelperTest.php:26ReplyDoneHeaderDataViewHelperTest.php:26ReplyDone -
core-ci voted on patch set 7 V +1 08/20/25, 08:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83663
-
Oliver Klee voted on patch set 7 CR +1 V +1 08/20/25, 08:17
-
Simon Praetorius voted on patch set 7 CR +2 V +2 08/29/25, 06:22
-
Simon Praetorius merged patch set 8 08/29/25, 06:22