I have build a custom content element with a link from field "header_link".
How can I set the title of that link as link text?
In the fluid template I use the link.typolink viewhelperin this way:
<f:link.typolink parameter="{data.header_link}" class="btn btn-primary" />
This results in
<a href="/page" title="link title" class="btn btn-primary">Page Title</a>
How do I set the link title as link text instead of the page title?
since TYPO3 10.3 it can be done like this
<f:link.typolink parameter="{data.header_link}" class="btn btn-primary" parts-as="parts">
{parts.title}
</f:link.typolink>
read more in the changelog documentation
these are all the parts u can use
<f:link.typolink parameter="123 _top news title" parts-as="parts">
{parts.url}
{parts.target}
{parts.class}
{parts.title}
{parts.additionalParams}
</f:link.typolink>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With