[TYPO3-dev] typolink with #anchor
Thorsten Kahler
thorsten.kahler at dkd.de
Thu Feb 15 09:22:35 CET 2007
Hi Daniel,
Daniel Brüßler wrote on 03.02.2007 19:15:
>
> This would work, but has no good smell:
>
> --snip--
> $temp = $this->pi_linkToPage('search', $GLOBALS['TSFE']->id);
> $pattern = '/href="(.+)"/i';
> $replacement = 'href="$1#search"';
> $content .= preg_replace($pattern, $replacement, $temp);
> --/snip--
>
> What's better?
>
$temp = $this->pi_linkToPage('search', $GLOBALS['TSFE']->id.'#search');
TSRef is your friend ;-)
Regars
Thorsten
More information about the TYPO3-dev
mailing list