Created
October 27, 2013 06:07
-
-
Save randomresult/7178426 to your computer and use it in GitHub Desktop.
Switch-Case mit TS-Setup-Constante #typo3 #fedext #fluid #vhs
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
//TYPOSCRIPT | |
//Values im Beispiel: 1 oder 2 - not set = default | |
plugin.tx_EXTNAME.settings.variableFOO = 1 | |
//Frontendausgabe | |
<v:var.set name="variableFOO" value="{v:var.typoscript(path: 'plugin.tx_EXTNAME.settings.variableFOO')}"/> | |
<v:switch value="{variableFOO}"> | |
<v:case case="1" break="TRUE"> | |
<img src="typo3conf/ext/EXTNAME/Resources/Public/images/image_1.png" /> | |
</v:case> | |
<v:case case="2" break="TRUE"> | |
<img src="typo3conf/ext/EXTNAME/Resources/Public/images/image_2.png" /> | |
</v:case> | |
<v:case case="default" break="TRUE"> | |
<img src="typo3conf/ext/EXTNAME/Resources/Public/images/image_default.png" /> | |
</v:case> | |
</v:switch> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment