Search code examples
typo3fluidtypo3-8.x

TYPO3 fluid: is it possible to write f:link.typolink inline?


I need something like this:

<f:link.typolink parameter="{link}">
     Linktext
</f:link.typolink>

but in inline syntax. Is this possible? Thanks!


Solution

  • if you have your linktext in a variable, you can write:

    {linktext -> f:link.typolink(parameter: '1')}
    

    if you want to set your linktext inside your fluidtemplate, you can:

    {f:variable(name:'linktext', value:'My Linktext')}
    
    {linktext -> f:link.typolink(parameter: '1')}
    

    parameter: 1 is a link to uid 1,
    in your example you can use the {link} variable without the curly braces, e.g.:
    {f:link.typolink(parameter: link)}