mercredi 31 mai 2017

TYPO3: Generate random variable in FLUID Template

I have three images in my FLUID template and would like to show one of these three images at random. Is there any method to do this in the FLUID template or is this impossible and I must go a other way?

I tried the TYPO3 extension "VHS" to generate a random number:

{v:random.number(minimum: 1, maximum: 3, minimumDecimals: 0, maximumDecimals: 0)}

In the frontend I see the generated number. But how can I set the random number to a variable to use it in a if-else-condition?




Aucun commentaire:

Enregistrer un commentaire