[TYPO3-english] Realurl preVars and lookUpTable

Loek Hilgersom hilgersom at xs4all.nl
Wed May 13 22:26:50 CEST 2009


Hi,

I'm trying to a realurl preVars configuration working with a lookUpTable and 
where the path segment will be skipped for the default option.

The url's should be like /page, /groupname/page, /othergroupname/page, etc.

It works if I do like this:

'preVars' => array(
	.....
	array(
		'GETvar' => 'tx_npgroup',
		'valueMap' => array(
			'' => '0',
			'groupname' => '1',
			'othergroupname' => '2'
		),
		'noMatch' => 'bypass',
	),

Now trying to do the same with a lookUpTable:

	array(
		'lookUpTable'       => array(
			'table'                 => 'tx_npgroup',
			'id_field'              => 'uid',
			'alias_field'           => 'shortname',
			'addWhereClause'        => ' AND NOT deleted',
			'useUniqueCache'        => 1,
			'useUniqueCache_conf'   => array(
				'strtolower'            => 1,
				'spaceCharacter'        => '-',
			),
		),
		'valueDefault' => '',
	),

The lookup works, except I can't skip the url-segment if no group is specified; 
the url /page now results in GET var tx_npgroup getting the value 'page', and of 
course you no longer get the correct page.
I would like to use noMatch => bypass but it overrules the lookuptable.

Any idea how this could be solved?
Loek


More information about the TYPO3-english mailing list