Skip to content
Snippets Groups Projects
Commit bd46974b authored by Benni Mack's avatar Benni Mack
Browse files

[FEATURE] Optimized integration of Page Rendering via Fluid

This change adds a new cObject "PAGEVIEW" which has a much simpler
usage than "FLUIDTEMPLATE", because it is meant to render
a full page like this:

page = PAGE
page.10 = PAGEVIEW
page.10.paths.100 = EXT:site_extension/Resources/Private/Templates

Nothing else is needed by default, as
a) the layoutRootPaths are resolved to be meant to be under "Templates/Layouts" or "Templates/layouts"
b) the partialRootPaths are resolved to be meant to be under "Templates/Partials" or "Templates/partials"
automatically are added.

The name of the template is resolved from the Page Layout (Backend Layout)
identifier, so add a "Templates/Pages/Mypage.html" if there is a backend layout with "mypage" added.

In addition, the reserved variables
* site (Site object)
* language (Site Language object)
* page (Page object)
* settings (Page / TypoScript Settings)

are injected automatically, so the View can work with this information directly.

template folders for "pages", "layouts" and "partials" can start
with an upper-case or lower-case in order to ensure
maximum compatibility and avoid common mistakes.

Why do we do this?

We've found that FLUIDTEMPLATE is often used for page rendering,
but lacks specific usages for pages to be worked directly without
the understanding of Fluid internals and TypoScript code.

This functionality will be further adapted to be used for further rendering of
custom Content Elements and Content Blocks which will follow in
subsequent steps.

For this reason this API is considered experimental until TYPO3 v13 LTS.

Resolves: #103504
Releases: main
Change-Id: Ieb2b665945ad671fe7e7c195b3201dbc0dbd7076
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/83626


Tested-by: default avatarBenjamin Kott <benjamin.kott@outlook.com>
Tested-by: default avatarOliver Bartsch <bo@cedev.de>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarBenjamin Kott <benjamin.kott@outlook.com>
Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
parent 7c39ce15
Branches
Tags
Showing
with 602 additions and 0 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment