Search code examples
typo3typo3-9.x

Typo3 9.5 UrlLinkHandler


I'm trying to use the UrlLinkHandler in Typo3 9.5. So far I've configured my Backend with TCEMain.

TCEMAIN.linkHandler.youtube {
    handler = TYPO3\CMS\Recordlist\LinkHandler\UrlLinkHandler
    label = Youtube
}

This works fine so far and I can add links within the RTE. For rendering the Link in the frontend my Typoscript looks like this:

config {
     recordLinks.youtube {
        typolink {
            wrap = test|test
        }
    }
}

But the frontend just shows a regular rendered anchor tag like <a href="http://domain.tld" target="_blank">Link</a>.

Any hints what I'm doing wrong?


Solution

  • Oehm, you're mixing up different things... You register a new UrlLinkHandler for BE, but your recordLinks-block for FE is a part of the RecordLinkHandler.

    If you want to have a link-type formatted in a special (like you described on typo3.net), then an own LinkHandler could be a solution.