[Typo3-dev] Setting anchors links with pi_linkTP_keepPIvars?

Michael Vogel ike at spamfence.net
Sun Oct 30 18:21:01 CET 2005


Hi!

I'm just making my first small steps in typo programming. At first I 
want to improve drwiki. By now it makes anchor links "hardcoded". That 
means the source code looks like this:

----------------------------------------------------
# parameter level defines if we are on an indentation level
function doTocLine( $anchor, $tocline, $level ) {

$link = '<a href="'.
         $this->getTypoLinkUrl('').'#'.$anchor.'">'.
         $tocline.'</a><br />';
if($level) {
    return $link."\n";
} else {
    return '<div class="tocline">'.$link."</div>\n";
}
}
----------------------------------------------------
Since I use RealURL I have to work with "<base href="..."> which makes 
problems with these anchor links.

So I want to exchange the above code with typo generated urls. I found 
the function "pi_linkTP_keepPIvars" that generates an adress that nearly 
does the right thing - but without the possibility to set anchors.

How can I do that?

Michael




More information about the TYPO3-dev mailing list