DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

Configuration

The Extension comes with an examle TypoScript setup that shows the basic concept how it can be used.

TypoScript

To use the link type detection feature of this extension call the LinkTypeDetector->detectLinkType in a USER object in you TypoScript code:

myObject = USER
myObject.userFunc = Tx\Linktypeswitch\LinkTypeDetector->detectLinkType

You can replace the basic linking in the default parseFunc of css_styled_content and handle each link type individually:

lib.parseFunc_RTE.tags.link >
lib.parseFunc_RTE.tags.link = CASE
lib.parseFunc_RTE.tags.link {

        // Normal links are generated as default typolink and wrappedn in a <span>
        External = TEXT
        External.current = 1
        External.typolink.parameter.data = parameters : allParams
        External.wrap = <span class="tx-linktypeswitch-link-external">|</span>

        // Non existing pages are not linked at all and only the link text is rendered
        PageNonExisting = TEXT
        PageNonExisting.current = 1

        // The link type will be used as key
        key.cObject = USER
        key.cObject.userFunc = Tx\Linktypeswitch\LinkTypeDetector->detectLinkType
}

A full example configuration can be found in Configuration/TypoScript/setup.txt.