Reputation: 593
I'm using Typo3 10 and bootstrap_package,
I want to learn how to get benefit from this fluid code for sliding content from home page to the subpages. Frontpage has a selected backend layout (Special_start) Subpages has selected backend layout (Default)..
<f:cObject typoscriptObjectPath="lib.dynamicContent" data="{pageUid: '{data.uid}', colPos: '3', slide: '{theme.pagelayout.{pagelayout}.colPos.3.slide}'}" />
Is there a simple solution with fluid to make the content in colpos 3 sliding in all subpages?
Thanks
Upvotes: 1
Views: 539
Reputation: 628
Look at this (only bootstrap package):
https://github.com/benjaminkott/bootstrap_package/commit/159dda4dc614d0468559615c51b6a457e22006f3
It is now possible to make content columns slide without touching the templates. The typoscript lib for content selection now accepts a slide parameter, that can be used to define the data collection behaviour.
Allowed Values:
-1 = back up to the siteroot 0 = default, no slide 1 = only the current level 2 = up from one level back
TypoScript Constants Example:
page.theme.pagelayout.<pagelayout>.colPos.<colPos>.slide = -1 page.theme.pagelayout.pagets__default.colPos.9.slide = -1
Fluid Example:
<f:cObject typoscriptObjectPath="lib.dynamicContent" data="{colPos: '9', slide: '-1'}" />
If you want to slide colPos 3 of the default template (bootstrap package) try:
page.theme.pagelayout.default.colPos.3.slide = -1
Upvotes: 1
Reputation: 10791
For understanding the sliding mechanism you may need to know about the original configuration in the first TYPO3 versions:
You had prebuild a backend-layout which differs 4 columns and which content could be assigned to special areas of the final frontend layout.
each content (tt_content
record) was assigned to one of these columns. the column is one field in the tt_content
record: 0 = main, 1 = left, 2 = right, 3 = border.
Meanwhile the columns are easily expandable and the basic layout consists of only one column.
Nevertheless you can use more column in your page rendering (FLUID). Especially if you use sliding content.
In the origin the rendering was done in typoscript and each column got a simple part of typoscript to compute the html from the records. (styles.content.get
with derivates about column number and slide mechanism).
In TYPO3 bootstrap you still use it as the VH <f:cObject typoscriptObjectPath="lib.dynamicContent" ...
just specifies some parameters what records should be rendered to HTML to insert in the frontend rendering (FLUID).
from the typoscript of ext:bootstrap_package
:
# EXAMPLE
# ---------------
# <f:cObject typoscriptObjectPath="lib.dynamicContent" data="{
# pageUid: '{data.uid}',
# colPos: '0',
# slide: '0',
# wrap: '<div class=\"hero\">|</div>',
# elementWrap: '<div class=\"element\">|</div>'
# }" />
Your BE layout does not need to match exactly (column wise) what you want to render in the frontend. Especially sliding columns don't need to be editable in pages beyond the main/ start page.
Upvotes: 1