[Typo3-dev] getting the name of the current page incl. all parameters

Sacha Vorbeck sachav at gmx.net
Mon Aug 18 13:42:05 CEST 2003


Hi,

I`m trying to build a new language menu like the one Kasper uses in the 
testsite.

I can`t find out how to get the URL of the current page with all 
parameters - also the MD5 parameters.

Here`s the code:

  // Check which is the default language and set the language-link 
accordingly
switch ($default_lang)
	{
		/* if it`s the english site, show link to the current page in german 
as the german version is always available.*/
		case en:
			$content .= '<span lang="de"><a href="'.str_replace("http://en.", 
"http://de.", t3lib_div::getIndpEnv('TYPO3_REQUEST_URL')).'" 
title="Website auf deutsch anzeigen">deutsch</a></span>';
		break;
		/* if it`s the german site, show link to the current page in english 
only if there`s a translation available. Otherwise show link to english 
homepage.*/
		default:
			$content .= ($langArr[1]?'<span lang="en"><a 
href="'.str_replace("http://de.", "http://en.", 
t3lib_div::getIndpEnv('TYPO3_REQUEST_URL')).'" title="show website in 
english">english</a></span>':'<span lang="en"><a 
href="http://en.red-dot.org/reddot/" title="show website in 
english">english</a></span>');
         break;
	}

This code only gives me URLS like http://de.red-dot.org/reddot/306.html 
but not the required: http://de.red-dot.org/reddot/306+M541c774671a.html

Does anybody know how to get URLs _with_ parameters?

-- 
thank you - all the best,

Sacha





More information about the TYPO3-dev mailing list