[Typo3-dev] changing config.linkVars for specific links

Peter Niederlag niederlag at ikd01.de
Mon Jun 14 11:47:19 CEST 2004


Hi,

Martin T. Kutschker schrieb am 14.06.2004 um 10:50 Uhr CEST

> Hi!
> 
> If I want to override a param listed in config.linkVars, how shall I
> do this? I've come up with this solution for 'L':
> 
> $linkVars = $GLOBALS['TSFE']->linkVars;
> $params = explode('&',substring($linkVars,1));
> unset($params['L']);
> $GLOBALS['TSFE']->linkVars = '&'.implode('&',$params);
> ...
> // some $cObj->typolink(...) stuff here
> ...
> $GLOBALS['TSFE']->linkVars = $linkVars;
> 
> Is there a better way?

It would be really lovely if there was some kind of TS-way to do this.
;)

Here is what I do in a IProcFunc(menu):
if ($conf["parentObj"]->sys_page->sys_language_uid == "1") {
$GLOBALS["TSFE"]->linkVars
=str_replace("L=1","L=0",$GLOBALS["TSFE"]->linkVars);
}
...

Peter
-- 
Peter Niederlag
*** aktuell: Seminare zu Typo3 ***
http://typo3.naw.de






More information about the TYPO3-dev mailing list