-
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.
[TASK] add new content element - Button
- Loading branch information
Showing
8 changed files
with
234 additions
and
3 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,43 @@ | ||
mod.wizards.newContentElement.wizardItems.contentElements { | ||
elements { | ||
button { | ||
title = LLL:EXT:theme_t3kit/Resources/Private/Language/ContentElements.xlf:button.title | ||
description = LLL:EXT:theme_t3kit/Resources/Private/Language/ContentElements.xlf:button.description | ||
iconIdentifier = content-elements-button | ||
tt_content_defValues { | ||
CType = button | ||
} | ||
} | ||
} | ||
show := addToList(button) | ||
} | ||
|
||
# Flexform selects | ||
TCEFORM.tt_content.pi_flexform.button.sDEF.buttonSize { | ||
addItems { | ||
0 = LLL:EXT:theme_t3kit/Resources/Private/Language/ContentElements.xlf:button.buttonSize_default | ||
btn-lg = LLL:EXT:theme_t3kit/Resources/Private/Language/ContentElements.xlf:button.buttonSize_large | ||
btn-sm = LLL:EXT:theme_t3kit/Resources/Private/Language/ContentElements.xlf:button.buttonSize_small | ||
btn-xs = LLL:EXT:theme_t3kit/Resources/Private/Language/ContentElements.xlf:button.buttonSize_extraSmall | ||
} | ||
} | ||
|
||
# Use layout field to customize Layout select-box on button | ||
# extend layout select-box only for this element | ||
TCEFORM.tt_content.layout { | ||
types { | ||
button { | ||
addItems { | ||
--div-- = Button layouts: | ||
# add value with index 0, to set it as a default, only for this element | ||
0 = Default | ||
11 = Primary | ||
12 = Success | ||
13 = Info | ||
14 = Warning | ||
15 = Danger | ||
16 = Link | ||
} | ||
} | ||
} | ||
} |
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,32 @@ | ||
tt_content { | ||
button =< lib.fluidContent | ||
button { | ||
templateName = Button | ||
|
||
dataProcessing { | ||
|
||
10 = T3kit\T3kitExtensionTools\DataProcessing\FlexFormProcessor | ||
10 { | ||
fieldName = pi_flexform | ||
as = settings | ||
} | ||
# "inherit" from lib.fluidContent | ||
365 < lib.fluidContent.dataProcessing.365 | ||
1910 < lib.fluidContent.dataProcessing.1910 | ||
|
||
# extend class mapping only for this element | ||
1910 { | ||
classMappings { | ||
# Override the standard default | ||
0 = btn btn-default | ||
11 = btn btn-primary | ||
12 = btn btn-success | ||
13 = btn btn-info | ||
14 = btn btn-warning | ||
15 = btn btn-danger | ||
16 = btn btn-link | ||
} | ||
} | ||
} | ||
} | ||
} |
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,35 @@ | ||
<T3DataStructure> | ||
<meta> | ||
<langDisable>1</langDisable> | ||
</meta> | ||
<sheets> | ||
<sDEF> | ||
<ROOT> | ||
<TCEforms> | ||
<sheetTitle>LLL:EXT:theme_t3kit/Resources/Private/Language/ContentElements.xlf:iconTextButton.flexform.sheetGeneral</sheetTitle> | ||
</TCEforms> | ||
<type>array</type> | ||
<el> | ||
<buttonSize> | ||
<TCEforms> | ||
<label>LLL:EXT:theme_t3kit/Resources/Private/Language/ContentElements.xlf:button.buttonSize</label> | ||
<config> | ||
<type>select</type> | ||
<items> | ||
</items> | ||
</config> | ||
</TCEforms> | ||
</buttonSize> | ||
<blockLevel> | ||
<TCEforms> | ||
<label>LLL:EXT:theme_t3kit/Resources/Private/Language/ContentElements.xlf:button.blockLevel</label> | ||
<config> | ||
<type>check</type> | ||
</config> | ||
</TCEforms> | ||
</blockLevel> | ||
</el> | ||
</ROOT> | ||
</sDEF> | ||
</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
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,14 @@ | ||
<div xmlns="http://www.w3.org/1999/xhtml" lang="en" xmlns:f="http://typo3.org/ns/fluid/ViewHelpers"> | ||
|
||
<f:layout name="ContentFooter" /> | ||
|
||
<f:section name="content"> | ||
<!-- theme_t3kit: Templates/CustomContentElements/Button.html [begin] --> | ||
<f:if condition="{data.header_link}"> | ||
<f:link.typolink parameter="{data.header_link}" class="{layoutClass}{f:if(condition: settings.buttonSize, then: ' {settings.buttonSize}')}{f:if(condition: settings.blockLevel, then: ' btn-block')}">{data.header}</f:link.typolink> | ||
</f:if> | ||
<!-- theme_t3kit: Templates/CustomContentElements/Button.html [end] --> | ||
</f:section> | ||
|
||
</div> | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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