You are here: All articles » Programming » Add anchor in getTypoLink
-
Add anchor in getTypoLink
written: 14 years ago
category: Programming
Previous
Next
getTypoLink() doesn't allow you to pass an anchor parameter. So, in order to add an anchor to such a link you just have to add the anchor part to the id parameter:
$this->cObj->getTypoLink('Link Label', '123#myanchor');
$this->cObj->
pi_linkToPage('Link Label', '123#myanchor'
);$this->cObj->
getTypoLink_URL('123#myanchor');By the way, ever saw what the harmless function
class.tslib_content.php:typoLink()
does? Have a look just for fun, it's a 300 liner! Feels like Typo3 has a damned considerable amount of workarounds for various special cases and requirements.http://www.typo3-jack.net/typo3-dev-lists-netfielders-de/3076-typo3-dev-typolink-anchor.html
Comments:
-
Daniel Hahler
14 years ago
Permalink
Leave a comment
-