[TYPO3-dev] Problem in RealURLs ['_DOMAINS']['encode'] Feature

Steffen Ritter info at rs-websystems.de
Sat Mar 14 10:10:20 CET 2009


Hey Dmitry, hey List,

I stumbled over a point in your _DOMAINS encoding feature in RealURL.
Using this very nice feature, the inspected GETVar ist removed. In some 
cases this might be useful, in others not... This is why I wanna ask if 
we can introduce another option "excludeFromTransition" or something 
named like that, which default to "true".

I'm gonna show off an very obvious example why and where this is needed.
Having the following[1] configuration in combination with the aftwareds 
mentioned PreVars configuration[2] Urls automatically result to:

L0: http://www.domain.de/willkommen.html
L1: http://www.domain.com/willkommen.html
L2: http://www.domain.com/willkommen.html
L3: http://www.domain.ru/willkommen.html

If language parameter is removed from URL Transition after applying the 
domain prependation and probably configuration remap, all page paths are 
generated in default language and the PreVar needed for L1 and L2 cannot 
be set.
If applying different settings for each language (to have translated 
labels in PostVarSet) this would even result in a big language mixture 
in page path since all data coming from DB has no language-parameter, 
all hardcoded labels are translated.

Introducing such parameter, deactivating itfor GETvar L reenables 
RealUrl to build pagepath in requested Language and correctly prepend it 
with PreVars setting. Resulting links will be:

L0: http://www.domain.de/willkommen.html
L1: http://www.domain.com/en/welcome.html
L2: http://www.domain.com/es/bienvenido.html
L3: http://www.domain.ru/glavnaja.html

Since such a change/functional addition would not break any 
compatability I would really like to see in future RealUrl versions.

Would like to have your comments on this topic.

Attached you will have the patch, implementing this little, but 
important feature...

kind regards


Steffen


-------------------------------------------------------------------
-------------------------------------------------------------------

-------------------------
configuration Snippet [1]
-------------------------

$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DOMAINS'] = array(
	'encode' => array(
		array(
			'GETvar' => 'L',
			'value' => '0',
			'ifDifferentToCurrent' => false,
			'urlPrepend' => 'http://www.domain.de'
		),
		array(
			'GETvar' => 'L',
			'value' => '1',
			'ifDifferentToCurrent' => false,
			'urlPrepend' => 'http://www.domain.com'
		),
		array(
			'GETvar' => 'L',
			'value' => '2',
			'ifDifferentToCurrent' => false,
			'urlPrepend' => 'http://www.domain.com'
		),
		array(
			'GETvar' => 'L',
			'value' => '3',
			'ifDifferentToCurrent' => false,
			'urlPrepend' => 'http://www.domain.ru'
		)
	),
	'decode' => array(

	)
);


-------------------------
configuration Snippet [2]
-------------------------


$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT']['preVars'][] =  array(
	'GETvar' => 'L',
         	'valueMap' => array(
             		'en' => '1',
	                'es' => '2',
         	),
	'noMatch' => 'bypass',
         'valueDefault' => 'de',
);
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: realURL.diff
URL: <http://lists.typo3.org/pipermail/typo3-dev/attachments/20090314/4661fe56/attachment.asc>


More information about the TYPO3-dev mailing list