Created
June 19, 2014 13:04
-
-
Save markhowellsmead/3561e00ebc85df4f3a1f to your computer and use it in GitHub Desktop.
TYPO3 ExtBase / Fluid - Create page link according to type of variable
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
# Create page link according to type of variable | |
# If link variable is an integer, use f:link.page else use f:link.external | |
# TYPO3 Extbase / Fluid | |
# www.mhm.li | [email protected] | 6/2014 | Free use, no credit required | |
<f:if condition="{link}"> | |
<f:if condition="{link -> v:math.round()} > 0"> | |
<f:then> | |
<f:link.page pageUid="{link}">Link text</f:link.page> | |
</f:then> | |
<f:else> | |
<f:link.external uri="{link}">Link text</f:link.external> | |
</f:else> | |
</f:if> | |
</f:if> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment