Commit fca10206 authored by Thomas Löffler's avatar Thomas Löffler

TypoScript adjustments

* Use new conditions
* Fix gridelements TS and templates
parent 7a1a9191
......@@ -2,9 +2,13 @@
namespace T3o\T3olayout\Backend\ViewHelpers;
class ResolveFileReferenceViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
class ResolveFileReferenceViewHelper extends AbstractViewHelper
{
use \TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
use CompileWithRenderStatic;
/**
* Initialize arguments
......@@ -22,9 +26,9 @@ class ResolveFileReferenceViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\Ab
* @param \Closure $renderChildrenClosure
* @param RenderingContextInterface $renderingContext
* @return string
* @throws Exception
* @throws \Exception
*/
public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
{
return \TYPO3\CMS\Backend\Utility\BackendUtility::resolveFileReferences('tt_content', 'assets', $arguments['row']);
}
......
[request.getQueryParams()['type'] == 4444]
[globalVar = GP:type = 4444]
config {
disableAllHeaderCode = 1
......
......@@ -40,7 +40,7 @@ config {
}
}
[globalVar = GP:L=1]
[siteLanguage("languageId") == 1]
config {
sys_language_uid = 1
language = de
......@@ -49,7 +49,7 @@ config {
}
[global]
[globalVar = GP:L=2]
[siteLanguage("languageId") == 2]
config {
sys_language_uid = 2
language = es
......
......@@ -79,7 +79,7 @@ page {
}
}
[globalVar = GP:type = 789]
[request.getQueryParams()['type'] == 789]
config {
disableAllHeaderCode = 1
forceTypeValue = 0
......
# loaded ts after install the ext:gridelements
[userFunc = TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('gridelements')]
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:gridelements/Configuration/TypoScript/setup.typoscript">
[global]
@import 'EXT:gridelements/Configuration/TypoScript/DataProcessingLibContentElement/setup.typoscript'
lib.gridelements.defaultGridSetup.cObject =< lib.contentElement
tt_content {
gridelements_pi1 =< lib.contentElement
gridelements_pi1 {
templateName = Generic
variables {
content = COA
content {
10 = USER
10 {
userFunc = GridElementsTeam\Gridelements\Plugin\Gridelements->main
setup {
# Grid Elements
# @see EXT:t3olayout/Configuration/PageTS/Gridelements.tsconfig
1 < lib.gridelements.defaultGridSetup
1 {
cObject {
templateName = OneColumn
templateRootPaths {
20 = EXT:t3olayout/Resources/Private/Templates/GridElements/
}
}
}
2 < .1
2.cObject.templateName = TwoColumns_50-50
3 < .1
3.cObject.templateName = TwoColumns_70-30
4 < .1
4.cObject.templateName = TwoColumns_30-70
5 < .1
5.cObject.templateName = ThreeColumns
6 < .1
6.cObject.templateName = FourColumns
7 < .1
7.cObject.templateName = Collapse
8 < .1
8.cObject.templateName = TwoColumns_2-10
9 < .1
9.cObject.templateName = TwoColumns_10-2
10 < .1
10.cObject.templateName = TwoColumns_3-9
11 < .1
11.cObject.templateName = TwoColumns_9-3
default < lib.gridelements.defaultGridSetup
}
}
}
tt_content.gridelements_pi1 {
templateRootPaths.2 = EXT:t3olayout/Resources/Private/Templates/GridElements/
templateName {
override >
cObject = CASE
cObject {
key.field = tx_gridelements_backend_layout
1 = TEXT
1.value = OneColumn
2 = TEXT
2.value = TwoColumns5050
3 = TEXT
3.value = TwoColumns7030
4 = TEXT
4.value = TwoColumns3070
5 = TEXT
5.value = ThreeColumns
6 = TEXT
6.value = FourColumns
7 = TEXT
7.value = Collapse
8 = TEXT
8.value = TwoColumns210
9 = TEXT
9.value = TwoColumns102
10 = TEXT
10.value = TwoColumns39
11 = TEXT
11.value = TwoColumns93
default = GridElement
}
}
}
tt_content.gridelements_view < tt_content.gridelements_pi1
#lib.gridelements.defaultGridSetup.cObject =< lib.contentElement
#
#tt_content {
# gridelements_pi1 =< lib.contentElement
# gridelements_pi1 {
# templateName = Generic
# variables {
# content = COA
# content {
# 10 = USER
# 10 {
# userFunc = GridElementsTeam\Gridelements\Plugin\Gridelements->main
# setup {
# # Grid Elements
# # @see EXT:t3olayout/Configuration/PageTS/Gridelements.tsconfig
# 1 < lib.gridelements.defaultGridSetup
# 1 {
# cObject {
# templateName = OneColumn
# templateRootPaths {
# 20 = EXT:t3olayout/Resources/Private/Templates/GridElements/
# }
# }
# }
#
# 2 < .1
# 2.cObject.templateName = TwoColumns5050
#
# 3 < .1
# 3.cObject.templateName = TwoColumns7030
#
# 4 < .1
# 4.cObject.templateName = TwoColumns3070
#
# 5 < .1
# 5.cObject.templateName = ThreeColumns
#
# 6 < .1
# 6.cObject.templateName = FourColumns
#
# 7 < .1
# 7.cObject.templateName = Collapse
#
# 8 < .1
# 8.cObject.templateName = TwoColumns210
#
# 9 < .1
# 9.cObject.templateName = TwoColumns102
#
# 10 < .1
# 10.cObject.templateName = TwoColumns39
#
# 11 < .1
# 11.cObject.templateName = TwoColumns93
#
# default < lib.gridelements.defaultGridSetup
# }
# }
# }
# }
# }
#}
#
#tt_content.gridelements_view < tt_content.gridelements_pi1
<div class="container">
<div class="panel-group ce-accordion {f:if(condition:'{data.frame_class}=="200"',then: 'ce-accordion--card')}" id="accordion{data.uid}" role="tablist" aria-multiselectable="true">
<f:for each="{data.tx_gridelements_view_children}" as="content">
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="headingOne{data.uid}">
<h5 class="panel-title">
<a class="collapsed" role="button" data-toggle="collapse" data-parent="#collapse{content.uid}" href="#collapse{content.uid}" aria-expanded="true" aria-controls="collapseOne01">
{content.header}
</a>
</h5>
</div>
<div class="panel-group ce-accordion {f:if(condition:'{data.frame_class}==" 200"',then: 'ce-accordion--card')}" id="accordion{data.uid}" role="tablist" aria-multiselectable="true">
<f:for each="{children.1.10}" as="content">
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="headingOne{data.uid}">
<h5 class="panel-title">
<a class="collapsed" role="button" data-toggle="collapse" data-parent="#collapse{content.data.uid}" href="#collapse{content.data.uid}" aria-expanded="true" aria-controls="collapseOne01">
{content.data.header}
</a>
</h5>
</div>
<div id="collapse{content.uid}" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne{data.uid}">
<div class="panel-body">
{data.tx_gridelements_view_child_{content.uid}->f:format.raw()}
</div>
<div id="collapse{content.data.uid}" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne{data.uid}">
<div class="panel-body">
<f:render partial="Child" arguments="{data: content.data, children: content.data.children, options: options, settings: settings}" />
</div>
</div>
</f:for>
</div>
</div>
</f:for>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-12 col-md-6 col-lg-3 mb-3">
{data.tx_gridelements_view_columns.10 -> f:format.raw()}
</div>
<div class="col-12 col-md-6 col-lg-3 mb-3">
{data.tx_gridelements_view_columns.20 -> f:format.raw()}
</div>
<div class="col-12 col-md-6 col-lg-3 mb-3">
{data.tx_gridelements_view_columns.30 -> f:format.raw()}
</div>
<div class="col-12 col-md-6 col-lg-3 mb-3">
{data.tx_gridelements_view_columns.40 -> f:format.raw()}
</div>
</div>
<div class="row">
<div class="col-12 col-md-6 col-lg-3 mb-3">
<f:if condition="{children.1.10}">
<f:for each="{children.1.10}" as="child">
<f:render partial="Child" arguments="{data: child.data, children: child.children, options: options, settings: settings}" />
</f:for>
</f:if>
</div>
<div class="col-12 col-md-6 col-lg-3 mb-3">
<f:if condition="{children.1.20}">
<f:for each="{children.1.20}" as="child">
<f:render partial="Child" arguments="{data: child.data, children: child.children, options: options, settings: settings}" />
</f:for>
</f:if>
</div>
<div class="col-12 col-md-6 col-lg-3 mb-3">
<f:if condition="{children.1.30}">
<f:for each="{children.1.30}" as="child">
<f:render partial="Child" arguments="{data: child.data, children: child.children, options: options, settings: settings}" />
</f:for>
</f:if>
</div>
<div class="col-12 col-md-6 col-lg-3 mb-3">
<f:if condition="{children.1.40}">
<f:for each="{children.1.40}" as="child">
<f:render partial="Child" arguments="{data: child.data, children: child.children, options: options, settings: settings}" />
</f:for>
</f:if>
</div>
</div>
</div>
<div class="container">
<f:if condition="{data.frame_class} == 200">
<f:then>
<div class="card-container">
{data.tx_gridelements_view_columns.10 -> f:format.raw()}
</div>
</f:then>
<f:else>
<div class="row">
<div class="col">
{data.tx_gridelements_view_columns.10 -> f:format.raw()}
</div>
</div>
</f:else>
</f:if>
</div>
\ No newline at end of file
<f:if condition="{data.frame_class} == 200">
<f:then>
<div class="card-container">
<f:if condition="{children.1.10}">
<f:for each="{children.1.10}" as="child">
<f:render partial="Child" arguments="{data: child.data, children: child.children, options: options, settings: settings}" />
</f:for>
</f:if>
</div>
</f:then>
<f:else>
<div class="row">
<div class="col">
<f:if condition="{children.1.10}">
<f:for each="{children.1.10}" as="child">
<f:render partial="Child" arguments="{data: child.data, children: child.children, options: options, settings: settings}" />
</f:for>
</f:if>
</div>
</div>
</f:else>
</f:if>
</div>
<div class="container">
<div class="row">
<div class="col mb-3">
{data.tx_gridelements_view_columns.10 -> f:format.raw()}
</div>
<div class="col mb-3">
{data.tx_gridelements_view_columns.20 -> f:format.raw()}
</div>
<div class="col mb-3">
{data.tx_gridelements_view_columns.30 -> f:format.raw()}
</div>
</div>
<div class="row">
<div class="col mb-3">
<f:if condition="{children.1.10}">
<f:for each="{children.1.10}" as="child">
<f:render partial="Child" arguments="{data: child.data, children: child.children, options: options, settings: settings}" />
</f:for>
</f:if>
</div>
<div class="col mb-3">
<f:if condition="{children.1.20}">
<f:for each="{children.1.20}" as="child">
<f:render partial="Child" arguments="{data: child.data, children: child.children, options: options, settings: settings}" />
</f:for>
</f:if>
</div>
<div class="col mb-3">
<f:if condition="{children.1.30}">
<f:for each="{children.1.30}" as="child">
<f:render partial="Child" arguments="{data: child.data, children: child.children, options: options, settings: settings}" />
</f:for>
</f:if>
</div>
</div>
</div>
<div class="container">
<div class="row">
<f:for each="{data.tx_gridelements_view_children}" as="content">
<div class="col-12 col-md-6 col-lg-4 mb-3">
{data.tx_gridelements_view_child_{content.uid}->f:format.raw()}
</div>
</f:for>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-12 col-md-10 mb-3">
<f:if condition="{children.1.10}">
<f:for each="{children.1.10}" as="child">
<f:render partial="Child" arguments="{data: child.data, children: child.children, options: options, settings: settings}" />
</f:for>
</f:if>
</div>
<div class="col-12 col-md-2 mb-3">
<f:if condition="{children.1.20}">
<f:for each="{children.1.20}" as="child">
<f:render partial="Child" arguments="{data: child.data, children: child.children, options: options, settings: settings}" />
</f:for>
</f:if>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-12 col-md-2 mb-3">
<f:if condition="{children.1.10}">
<f:for each="{children.1.10}" as="child">
<f:render partial="Child" arguments="{data: child.data, children: child.children, options: options, settings: settings}" />
</f:for>
</f:if>
</div>
<div class="col-12 col-md-10 mb-3">
<f:if condition="{children.1.20}">
<f:for each="{children.1.20}" as="child">
<f:render partial="Child" arguments="{data: child.data, children: child.children, options: options, settings: settings}" />
</f:for>
</f:if>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-12 col-md-4 mb-3">
<f:if condition="{children.1.10}">
<f:for each="{children.1.10}" as="child">
<f:render partial="Child" arguments="{data: child.data, children: child.children, options: options, settings: settings}" />
</f:for>
</f:if>
</div>
<div class="col-12 col-md-8 mb-3">
<f:if condition="{children.1.20}">
<f:for each="{children.1.20}" as="child">
<f:render partial="Child" arguments="{data: child.data, children: child.children, options: options, settings: settings}" />
</f:for>
</f:if>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-12 col-md-3 mb-3">
<f:if condition="{children.1.10}">
<f:for each="{children.1.10}" as="child">
<f:render partial="Child" arguments="{data: child.data, children: child.children, options: options, settings: settings}" />
</f:for>
</f:if>
</div>
<div class="col-12 col-md-9 mb-3">
<f:if condition="{children.1.20}">
<f:for each="{children.1.20}" as="child">
<f:render partial="Child" arguments="{data: child.data, children: child.children, options: options, settings: settings}" />
</f:for>
</f:if>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-12 col-md-6 mb-3">
<f:if condition="{children.1.10}">
<f:for each="{children.1.10}" as="child">
<f:render partial="Child" arguments="{data: child.data, children: child.children, options: options, settings: settings}" />
</f:for>
</f:if>
</div>
<div class="col-12 col-md-6 mb-3">
<f:if condition="{children.1.20}">
<f:for each="{children.1.20}" as="child">
<f:render partial="Child" arguments="{data: child.data, children: child.children, options: options, settings: settings}" />
</f:for>
</f:if>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-12 col-md-8 mb-3">
<f:if condition="{children.1.10}">
<f:for each="{children.1.10}" as="child">
<f:render partial="Child" arguments="{data: child.data, children: child.children, options: options, settings: settings}" />
</f:for>
</f:if>
</div>
<div class="col-12 col-md-4 mb-3">
<f:if condition="{children.1.20}">
<f:for each="{children.1.20}" as="child">
<f:render partial="Child" arguments="{data: child.data, children: child.children, options: options, settings: settings}" />
</f:for>
</f:if>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-12 col-md-9 mb-3">
<f:if condition="{children.1.10}">
<f:for each="{children.1.10}" as="child">
<f:render partial="Child" arguments="{data: child.data, children: child.children, options: options, settings: settings}" />
</f:for>
</f:if>
</div>
<div class="col-12 col-md-3 mb-3">
<f:if condition="{children.1.20}">
<f:for each="{children.1.20}" as="child">
<f:render partial="Child" arguments="{data: child.data, children: child.children, options: options, settings: settings}" />
</f:for>
</f:if>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-12 col-md-10 mb-3">
{data.tx_gridelements_view_columns.10 -> f:format.raw()}
</div>
<div class="col-12 col-md-2 mb-3">
{data.tx_gridelements_view_columns.20 -> f:format.raw()}
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-12 col-md-2 mb-3">
{data.tx_gridelements_view_columns.10 -> f:format.raw()}
</div>
<div class="col-12 col-md-10 mb-3">
{data.tx_gridelements_view_columns.20 -> f:format.raw()}
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-12 col-md-3 mb-3">
{data.tx_gridelements_view_columns.10 -> f:format.raw()}
</div>
<div class="col-12 col-md-9 mb-3">
{data.tx_gridelements_view_columns.20 -> f:format.raw()}
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-12 col-md-4 mb-3">
{data.tx_gridelements_view_columns.10 -> f:format.raw()}
</div>
<div class="col-12 col-md-8 mb-3">
{data.tx_gridelements_view_columns.20 -> f:format.raw()}
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-12 col-md-6 mb-3">
{data.tx_gridelements_view_columns.10 -> f:format.raw()}
</div>
<div class="col-12 col-md-6 mb-3">
{data.tx_gridelements_view_columns.20 -> f:format.raw()}
</div>
</div>