Add container with two columns
This commit is contained in:
+14
-1
@@ -1,6 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
call_user_func(function () {
|
call_user_func(function () {
|
||||||
|
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\B13\Container\Tca\Registry::class)->configureContainer(
|
||||||
|
new \B13\Container\Tca\ContainerConfiguration(
|
||||||
|
'ep_container_halves',
|
||||||
|
'Zweispalter',
|
||||||
|
'50/50 Aufteilung',
|
||||||
|
[
|
||||||
|
[
|
||||||
|
['name' => 'Elemente', 'colPos' => 300],
|
||||||
|
]
|
||||||
|
]
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\B13\Container\Tca\Registry::class)->configureContainer(
|
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\B13\Container\Tca\Registry::class)->configureContainer(
|
||||||
new \B13\Container\Tca\ContainerConfiguration(
|
new \B13\Container\Tca\ContainerConfiguration(
|
||||||
'ep_container_thirds',
|
'ep_container_thirds',
|
||||||
@@ -43,7 +56,7 @@ call_user_func(function () {
|
|||||||
'
|
'
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach (['ep_container_thirds', 'ep_container_teasergroup'] as $field) {
|
foreach (['ep_container_halves', 'ep_container_thirds', 'ep_container_teasergroup'] as $field) {
|
||||||
$GLOBALS['TCA']['tt_content']['types'][$field] = array_replace_recursive(
|
$GLOBALS['TCA']['tt_content']['types'][$field] = array_replace_recursive(
|
||||||
$GLOBALS['TCA']['tt_content']['types'][$field],
|
$GLOBALS['TCA']['tt_content']['types'][$field],
|
||||||
$headerConfig
|
$headerConfig
|
||||||
|
|||||||
+11
@@ -1,3 +1,14 @@
|
|||||||
|
tt_content.ep_container_halves =< lib.contentElement
|
||||||
|
tt_content.ep_container_halves {
|
||||||
|
templateName = Halves
|
||||||
|
templateRootPaths {
|
||||||
|
10 = EXT:ep_theme/Resources/Private/Templates/Container
|
||||||
|
}
|
||||||
|
dataProcessing {
|
||||||
|
100 = B13\Container\DataProcessing\ContainerProcessor
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
tt_content.ep_container_thirds =< lib.contentElement
|
tt_content.ep_container_thirds =< lib.contentElement
|
||||||
tt_content.ep_container_thirds {
|
tt_content.ep_container_thirds {
|
||||||
templateName = Thirds
|
templateName = Thirds
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
|
||||||
|
xmlns:ep="http://typo3.org/ns/EP/EpTheme/ViewHelpers"
|
||||||
|
data-namespace-typo3-fluid="true">
|
||||||
|
|
||||||
|
<f:layout name="Default"/>
|
||||||
|
|
||||||
|
<f:section name="Main">
|
||||||
|
<ep:container data="{data}" cssClasses="py-8">
|
||||||
|
<f:render partial="Header/Header" arguments="{header: data.header, subheader: data.subheader, layout: data.header_layout, link: data.header_link}" />
|
||||||
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-8">
|
||||||
|
<f:for each="{children_300}" as="record">
|
||||||
|
{record.renderedContent -> f:format.raw()}
|
||||||
|
</f:for>
|
||||||
|
</div>
|
||||||
|
</ep:container>
|
||||||
|
</f:section>
|
||||||
|
|
||||||
|
</html>
|
||||||
@@ -6,11 +6,7 @@
|
|||||||
|
|
||||||
<f:section name="Main">
|
<f:section name="Main">
|
||||||
<ep:container data="{data}" cssClasses="py-8">
|
<ep:container data="{data}" cssClasses="py-8">
|
||||||
<f:if condition="{data.header_layout} != 100">
|
<f:render partial="Header/Header" arguments="{header: data.header, subheader: data.subheader, layout: data.header_layout, link: data.header_link}" />
|
||||||
<f:if condition="{data.header}">
|
|
||||||
<f:render partial="Header/Header" arguments="{header: data.header, subheader: data.subheader, layout: data.header_layout, link: data.header_link}" />
|
|
||||||
</f:if>
|
|
||||||
</f:if>
|
|
||||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
|
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
|
||||||
<f:for each="{children_300}" as="record">
|
<f:for each="{children_300}" as="record">
|
||||||
{record.renderedContent -> f:format.raw()}
|
{record.renderedContent -> f:format.raw()}
|
||||||
|
|||||||
Reference in New Issue
Block a user