samedi 28 novembre 2020

Typo3. How to change fluid tempate with language condition

I use Typo3 1.4.10, using the Bootstrap package

I try to change a Typo3 fluid template based on the current front-end language being used. I have tried various "if conditions". I just cannot figure it out. I have tried using siteLanguage, language and sys_language_uid. In the TSsetup siteLanguage works for me as in:

[siteLanguage("locale") == "en_US.UTF-8"]
 ...

[global]

I cannot figure out is how to do something similar in the fluid templates. I tried tons of different ways. How can I correct the below example taken from one of my many attempts?

<f:if condition="{siteLanguage} == {siteLanguage.locale}">
<f:if condition="{siteLanguage.locale} == en">
 <f:then>
    language 1
</f:then>
<f:else>
    language 0
</f:else>
</f:if> </f:if>

Aucun commentaire:

Enregistrer un commentaire