[Typo3] HMENU.special = language; &L=0&L=1 - Why ?

Stefan Geith typo3dev at geithware.de
Mon Mar 14 13:50:45 CET 2005


Stefan Geith schrieb:

>> Stefan Geith wrote:
>>> BUT the links in the language-menu look like this:
>>>    http://test.test.de/7.html?&L=0&L=1
>>> and
>>>    http://test.test.de/7.html?&L=1&L=1
>>>
>>
>> take a look at this bug:
>> http://bugs.typo3.org/bug_view_page.php?bug_id=0000490
> 
> The patches there do NOT work:
> - the first patch simply removes any '&L=current_language'
>   in ALL Menu-Entries ...
> - the second patch doesn't change anything ...

Solution:
in class.t3lib_tstemplate.php, replace lines
	1325	// linkVars
	1326	$LD['linkVars'] = $GLOBALS['TSFE']->linkVars.$addParams;
with:
	// linkVars
	$lV = Array();
	$tmp = explode ('&',$GLOBALS['TSFE']->linkVars);
	while(list($k,$e)=each($tmp)) if ($e)	{
		list($k,$v) = explode('=',$e);
		$lV[$k] = $v;
	}
	$tmp = explode ('&',$addParams);
	while(list($k,$e)=each($tmp)) if ($e)	{
		list($k,$v) = explode('=',$e);
		$lV[$k] = $v;
	}
	$LD['linkVars'] = t3lib_div::implodeArrayForUrl('',$lV);

-

Stefan



More information about the TYPO3-english mailing list