Use a typoscript variable in a fluid template

Typoscript:

lib.myvar = TEXT
lib.myvar.value = 1

FLUID template Condition:

<f:if condition="{f:cObject(typoscriptObjectPath: 'lib.myvar')}"><f:format.raw>{title}</f:format.raw></f:if>

Print content of variable (content includes html, so we use raw viewhelper):

<f:format.raw>{f:cObject(typoscriptObjectPath: 'lib.myvar')}</f:format.raw>

Be the first to comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.