-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] new way to add collapsible content elements (accordion) bas…
…ed on gridelements
- Loading branch information
1 parent
b95a5bb
commit 5951a84
Showing
11 changed files
with
290 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?> | ||
<T3DataStructure> | ||
<meta type="array"> | ||
<langDisable>1</langDisable> | ||
</meta> | ||
<sheets> | ||
<columns> | ||
<ROOT type="array"> | ||
<TCEforms> | ||
<sheetTitle>LLL:EXT:theme_t3kit/Resources/Private/Language/GridElements.xlf:collapsible.flexform.title</sheetTitle> | ||
</TCEforms> | ||
<el type="array"> | ||
<expanded> | ||
<TCEforms> | ||
<label>LLL:EXT:theme_t3kit/Resources/Private/Language/GridElements.xlf:collapsible.flexform.expanded</label> | ||
<config> | ||
<type>check</type> | ||
<default></default> | ||
</config> | ||
</TCEforms> | ||
</expanded> | ||
</el> | ||
</ROOT> | ||
</columns> | ||
</sheets> | ||
</T3DataStructure> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
tx_gridelements.setup.Collapsible { | ||
title = LLL:EXT:theme_t3kit/Resources/Private/Language/GridElements.xlf:collapsible | ||
description = LLL:EXT:theme_t3kit/Resources/Private/Language/GridElements.xlf:collapsible_description | ||
flexformDS = FILE:EXT:theme_t3kit/Configuration/GridElements/FlexForms/Collapsible.xml | ||
icon = EXT:theme_t3kit/Resources/Public/Icons/GridElements/collapsible.svg | ||
config { | ||
colCount = 1 | ||
rowCount = 1 | ||
rows { | ||
1 { | ||
columns { | ||
1 { | ||
name = LLL:EXT:theme_t3kit/Resources/Private/Language/GridElements.xlf:col1 | ||
colPos = 0 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
tx_gridelements.setup.CollapsibleGroup { | ||
title = LLL:EXT:theme_t3kit/Resources/Private/Language/GridElements.xlf:collapsibleGroup | ||
description = LLL:EXT:theme_t3kit/Resources/Private/Language/GridElements.xlf:collapsibleGroup_description | ||
icon = EXT:theme_t3kit/Resources/Public/Icons/GridElements/collapsibleGroup.svg | ||
config { | ||
colCount = 1 | ||
rowCount = 1 | ||
rows { | ||
1 { | ||
columns { | ||
1 { | ||
name = LLL:EXT:theme_t3kit/Resources/Private/Language/GridElements.xlf:col1 | ||
colPos = 0 | ||
allowed = gridelements_pi1 | ||
allowedGridTypes = Collapsible | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
lib.gridelements { | ||
Collapsible < .defaultGridSetup | ||
Collapsible { | ||
columns.0 { | ||
renderObj > | ||
renderObj = COA | ||
renderObj { | ||
20 =< tt_content | ||
} | ||
} | ||
|
||
cObject = FLUIDTEMPLATE | ||
cObject { | ||
layoutRootPaths { | ||
20 = EXT:fluid_styled_content/Resources/Private/Layouts | ||
30 = EXT:theme_t3kit/Resources/Private/Layouts/GridElements | ||
} | ||
partialRootPaths { | ||
20 = EXT:fluid_styled_content/Resources/Private/Partials | ||
} | ||
file = EXT:theme_t3kit/Resources/Private/Templates/GridElements/Collapsible.html | ||
dataProcessing { | ||
10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor | ||
10 { | ||
references.fieldName = media | ||
} | ||
# "inherit" from lib.fluidContent | ||
365 < lib.fluidContent.dataProcessing.365 | ||
375 < lib.fluidContent.dataProcessing.375 | ||
385 < lib.fluidContent.dataProcessing.385 | ||
395 < lib.fluidContent.dataProcessing.395 | ||
|
||
# extend "wrapper" class mapping only for GridElements | ||
365 { | ||
classMappings { | ||
11 = gridelements-example-wrapper-1 | ||
12 = gridelements-example-wrapper-2 | ||
} | ||
} | ||
|
||
|
||
1910 < lib.fluidContent.dataProcessing.1910 | ||
|
||
# extend "layout" class mapping only for GridElements | ||
1910 { | ||
classMappings { | ||
11 = gridelements-example-layout-1 | ||
12 = gridelements-example-layout-2 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
tt_content.gridelements_pi1.20.10.setup.Collapsible < lib.gridelements.Collapsible |
56 changes: 56 additions & 0 deletions
56
Configuration/GridElements/TypoScript/CollapsibleGroup.setupts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
lib.gridelements { | ||
CollapsibleGroup < .defaultGridSetup | ||
CollapsibleGroup { | ||
columns.0 { | ||
renderObj > | ||
renderObj = COA | ||
renderObj { | ||
20 =< tt_content | ||
} | ||
} | ||
|
||
cObject = FLUIDTEMPLATE | ||
cObject { | ||
layoutRootPaths { | ||
20 = EXT:fluid_styled_content/Resources/Private/Layouts | ||
30 = EXT:theme_t3kit/Resources/Private/Layouts/GridElements | ||
} | ||
partialRootPaths { | ||
20 = EXT:fluid_styled_content/Resources/Private/Partials | ||
} | ||
file = EXT:theme_t3kit/Resources/Private/Templates/GridElements/CollapsibleGroup.html | ||
dataProcessing { | ||
10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor | ||
10 { | ||
references.fieldName = media | ||
} | ||
# "inherit" from lib.fluidContent | ||
365 < lib.fluidContent.dataProcessing.365 | ||
375 < lib.fluidContent.dataProcessing.375 | ||
385 < lib.fluidContent.dataProcessing.385 | ||
395 < lib.fluidContent.dataProcessing.395 | ||
|
||
# extend "wrapper" class mapping only for GridElements | ||
365 { | ||
classMappings { | ||
11 = gridelements-example-wrapper-1 | ||
12 = gridelements-example-wrapper-2 | ||
} | ||
} | ||
|
||
|
||
1910 < lib.fluidContent.dataProcessing.1910 | ||
|
||
# extend "layout" class mapping only for GridElements | ||
1910 { | ||
classMappings { | ||
11 = gridelements-example-layout-1 | ||
12 = gridelements-example-layout-2 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
tt_content.gridelements_pi1.20.10.setup.CollapsibleGroup < lib.gridelements.CollapsibleGroup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<!-- theme_t3kit: Layouts/Empty.html [begin] --> | ||
|
||
<f:render section="content" /> | ||
|
||
<!-- theme_t3kit: Layouts/Empty.html [end] --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
<f:layout name="{f:if(condition: data.tx_gridelements_container, then: 'Empty', else: 'HeaderContentFooter')}" /> | ||
|
||
<f:debug>{data}</f:debug> | ||
|
||
<f:section name="content"> | ||
<div class="panel panel-default {layoutClass} {alignClass}"> | ||
<div class="panel-heading" role="tab" id="heading-{data.uid}"> | ||
<h4 class="panel-title"> | ||
<a data-toggle="collapse" data-parent="#group-{data.tx_gridelements_container}" href="#collapse-{data.uid}">{data.header}</a> | ||
</h4> | ||
</div> | ||
<div id="collapse-{data.uid}" class="panel-collapse collapse {f:if(condition: data.pi_flexform.data.columns.lDEF.expanded.vDEF, then: 'in', else: '')}" role="tabpanel"> | ||
<div class="panel-body"> | ||
<f:format.raw>{data.tx_gridelements_view_column_0}</f:format.raw> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</f:section> |
9 changes: 9 additions & 0 deletions
9
Resources/Private/Templates/GridElements/CollapsibleGroup.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<f:layout name="HeaderContentFooter" /> | ||
|
||
<f:debug>{data}</f:debug> | ||
|
||
<f:section name="content"> | ||
<div class="panel-group" id="group-{f:if(condition: data._LOCALIZED_UID, then: data._LOCALIZED_UID, else: data.uid)}" role="tablist" aria-multiselectable="{f:if(condition: '{data.pi_flexform.data.columns.lDEF.multiselectable.vDEF}', then: 'true', else: 'false')}"> | ||
<f:format.raw>{data.tx_gridelements_view_column_0}</f:format.raw> | ||
</div> | ||
</f:section> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.