

First create a file named "userFunc.inc" in your fileadmin folder, then fill the file with this content:
<? class user_userFunc{ function addAttributes($content,$conf) { $aTagParams = $this->cObj->stdWrap($conf['aTagParams'], $conf['aTagParams.']); $content["aTagParams"].= ' '.$aTagParams; $content['TAG'] = '<A HREF="'.$content["url"].'"'.$content["targetParams"].$content["aTagParams"].'>'; return $content['TAG']; } } ?>
Then at the top of your typoscript SETUP, you insert a line like this:
includeLibs.userFunc= fileadmin/userFunc.inc
Now you are ready to use the function in your "typolink" setups, where you add it to your existing typolink code like this:
typolink.userFunc = user_userFunc->addAttributes typolink.userFunc.aTagParams.dataWrap = alt="{field:title}" title="{field:title}"
The extra "aTagParams" are then added to the normal "aTagParams"
This snippet was submitted by Peter Klein




Add comment