[Typo3-dev] Setting anchors links with pi_linkTP_keepPIvars?
Jonas Dübi
admin at commandline.ch
Tue Nov 1 07:39:24 CET 2005
Hi
I actually don't know if it's the right way what I'm doing but it works
great :-).
Actually I use a stdWrap for doing links, that looks similar to that:
setup:
plugin.yourextension_pi1{
...
someLink.wrap = <div class="tocline">|</div>
someLink.typolink = 1
...
}
php:
$link = $conf['someLink.']
$link['typolink.']['parameter'] = $targetPid;
$link['typolink.']['additionParameter'] = "&myparameter1=".$parameter1;
return $this->cObj->stdWrap($betweenTheLink, $link);
The great think about this is, that as you use Typoscript, you can do a
lot things without changing the php code...
Greets
Jonas
Michael Vogel wrote:
> 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