[Typo3-german] typolink.userfunc mit alt= bzw. title=page_title : page_subtitle ?
Bernhard Welzel
newsgroup at i-nox.de
Tue Sep 13 17:30:14 CEST 2005
ich habe eine Typolink Userfunc um bei Links interne/externe Links zu
unterscheiden, und würde nun gerne bei internen Links auch <a title=
$page_title setzen.
Leider habe ich in den Newsgroups (typo3.german & typo3.english) sowie
bei typo3.org / typo3.net bislang keinen Lösungsansatz gefunden.
- Bernhard Welzel
Setup.
includeLibs.user_typolink = fileadmin/scripts/usertypolink.php
tt_content.text.20.parseFunc {
tags.link.typolink.userFunc = user_typolink_class->main
}
sowie:
<?php
class user_typolink_class {
var $cObj; // reference to the calling object.
function main($content,$conf) {
global $TSFE;
if ($content["TYPE"] == "url"){
$linktarget="a_extern";
$linktitle='Link: '.$content["url"];
}
else {
$linktarget="a_intern";
}
return '<A HREF="'.$content["url"].'" class="'.$linktarget.'"
title="'.$linktitle.'"'.$content["targetParams"].$content["aTagParams"].'
title='.$verflixtwoherbekommeichdas.'" >';
}
}
?>
More information about the TYPO3-german
mailing list