Skip to content

Commit

Permalink
[FEATURE] #103894 - Additional properties for columns in Page Layouts
Browse files Browse the repository at this point in the history
References: TYPO3-Documentation/Changelog-To-Doc#922
Releases: main
  • Loading branch information
linawolf committed Jun 26, 2024
1 parent 989cae0 commit 7cc03b5
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 0 deletions.
48 changes: 48 additions & 0 deletions Documentation/PageTsconfig/Mod/WebLayout/BackendLayout.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,32 @@ package (GitHub) <https://github.com/benjaminkott/bootstrap_package/tree/master/

When content elements are added to this area, the value of `colPos`

.. confval:: identifier
:name: mod-web-layout-BackendLayouts-backendLayout-title-config-backend_layout-rows-row-columns-col-identifier
:type: string

An identifier that can will be used by the page content
DataProcessor to identify the content elements within this
area.

It is a speaking representation for the :confval:`colPos <mod-web-layout-BackendLayouts-backendLayout-title-config-backend_layout-rows-row-columns-col-colPos>`,
such as "main", "sidebar" or "footerArea".

.. confval:: slideMode
:name: mod-web-layout-BackendLayouts-backendLayout-title-config-backend_layout-rows-row-columns-col-slideMode
:type: string, "" (empty string), "slide", "collect", "collectReverse"

An identifier that can will be used by the page content
DataProcessor to identify the content elements within this
area.

`slide`
If no content is found, check the parent pages for more content
`collect`
Use all content from this page, and the parent pages as one collection
`collectReverse`
Same as "collect" but in the opposite order

.. confval:: colspan
:name: mod-web-layout-BackendLayouts-backendLayout-title-config-backend_layout-rows-row-columns-col-colspan
:type: integer, 1 - :confval:`mod-web-layout-BackendLayouts-backendLayout-title-config-backend_layout.colCount`
Expand All @@ -97,3 +123,25 @@ package (GitHub) <https://github.com/benjaminkott/bootstrap_package/tree/master/

Can be used if the content element area should span multiple
rows.

Example: Use a backend layout in the page content data processor
================================================================

Define the backend layout via page TSconfig, for example in the site:

.. literalinclude:: _BackendLayout.tsconfig
:caption: config/sites/my-site/page.tsconfig

Configure the output via TypoScript, using the content object
:ref:`PAGEVIEW <t3tsref:cobj-pageview>` and the DataProcessor
`page-content`.

.. todo: Link Dataprocessor
.. literalinclude:: _BackendLayout.typoscript
:caption: config/sites/my-site/setup.typoscript

Use the identifiers of the columns in the Fluid template:

.. literalinclude:: _Default.html
:caption: EXT:my_sitepackage/Resources/Private/Templates/Pages/Default.html
41 changes: 41 additions & 0 deletions Documentation/PageTsconfig/Mod/WebLayout/_BackendLayout.tsconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
mod.web_layout.BackendLayouts {
default {
title = Default
config {
backend_layout {
colCount = 2
rowCount = 2
rows {
1 {
columns {
1 {
name = Jumbotron
colPos = 1
identifier = jumbotron
slideMode = slide
colspan = 2
}
}
}

1 {
columns {
1 {
name = Left
colPos = 0
identifier = left
}

2 {
name = Right
colPos = 2
identifier = right
slideMode = collectReverse
}
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
page = PAGE
page {
10 = PAGEVIEW
10 {
paths.10 = EXT:my_sitepackage/Resources/Private/Templates/
dataProcessing.10 = page-content
dataProcessing.10.as = myContent
}
}
12 changes: 12 additions & 0 deletions Documentation/PageTsconfig/Mod/WebLayout/_Default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<f:render partial="Jumbotron" arguments="{jumbotronContent: myContent.jumbotron}"/>
<main>
<f:for each="{myContent.left.records}" as="contentElement">
<f:cObject typoscriptObjectPath="tt_content.{contentElement.data.CType}"
data="{contentElement.data}"
table="tt_content"
/>
</f:for>
</main>
<aside>
<f:render partial="Aside" arguments="{content: myContent.right}"/>
</aside>

0 comments on commit 7cc03b5

Please sign in to comment.