[TYPO3] Mark external links

Robert Markula robert.markula at gmx.net
Mon Jul 10 18:18:01 CEST 2006


Robert Markula wrote:
> Hi Kenneth!
> Thanks for the link! The only thing is that the TS snippet in this
> example marks all links with an image. I just want to mark external
> links with an image.
> 
> I've found the solution with the help of google:
> # Mark external links with an image
> lib.parseFunc_RTE.tags.link.prepend = COA
> lib.parseFunc_RTE.tags.link.prepend {
>   20 = TEXT
>   20.value = <img src="fileadmin/system/templates/res/link_ext.gif"
> alt="" title="Dieser Link führt zu einer externen Webseite" />&nbsp;
>   20.if {
>     value = 0
>     isGreaterThan.cObject = TEXT
>     isGreaterThan.cObject.intval = 1
>     isGreaterThan.cObject.data = parameters:allParams
>     negate = 1
>   }
> }
> # Use the above function also for lib.parseFunc
> lib.parseFunc.tags.link.prepend < lib.parseFunc_RTE.tags.link.prepend

The only problem of this solution is that also all mail links are 
processed by the above code (i.e. also e-mail links get the image in 
front of them). How can I avoid that?

Cheers,
Ro



More information about the TYPO3-english mailing list