[TYPO3-english] typolink {link.title}

Jigal van Hemert jigal.van.hemert at typo3.org
Wed Jan 11 22:38:12 CET 2017


Hi,

On 11/01/2017 15:57, "HocomAdvies [ 🌷 Wiechert Hooghwinkel ]" wrote:
> Just a simple question. How to get the “title” text from a link displayed ?
> This code generates the title of the linked page but not the title which was inserted when selecting the link to the page in the BE form.
>
> <div class="button"><f:if condition="{data.tx_mask_teaser_link}">
>      <f:link.typolink parameter="{data.tx_mask_teaser_link}">{link.title}</f:link.typolink>
> </f:if></div>
>       </div>

If you have a link field with a value like:
29 - - "Some title"

you can simply leave out any children of the typolink viewhelper:

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

If there is no title set in that field then it will use the title of the 
linked page.


-- 
Jigal van Hemert
TYPO3 CMS Active Contributor

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-english mailing list