[TYPO3-english] Integrate RealUrl in my own extension

Francois Suter fsu-lists at cobweb.ch
Fri Apr 23 10:38:28 CEST 2010


Hi,

> 'postVarSets' => array (
>      '_DEFAULT' => array (
>          '0' => array (
>              'GETvar' => 'tx_mst_pi1[spot]',
>              'lookUpTable' => array (
>                  'table' => 'tx_mst_plads',
>                  'id_field' => 'uid',
>                  'alias_field' => 'title',
>                  'addWhereClause' => ' AND NOT deleted',
>                  'useUniqueCache' => '1',
>                  'useUniqueCache_conf' => array (
>                      'strtolower' => '1',
>                      'spaceCharacter' => '-',
>                  ),
>              ),
>          ),
>      ),
> ),
>

Your configuration is missing a level. It should be:

'postVarSets' => array (
     '_DEFAULT' => array (
	'plads' => array(
	        0 => array (
         	    'GETvar' => 'tx_mst_pi1[spot]',
	            'lookUpTable' => array (
         	        'table' => 'tx_mst_plads',
                 	'id_field' => 'uid',
	                'alias_field' => 'title',
         	        'addWhereClause' => ' AND NOT deleted',
                 	'useUniqueCache' => '1',
	                'useUniqueCache_conf' => array (
         	            'strtolower' => '1',
                 	    'spaceCharacter' => '-',
	                ),
                 ),
             ),
         ),
     ),
),

Note the addition of the "plads" keyword. You can use whatever other 
keyword you want here. This keyword will appear in the URL, before the 
name of your item. This keyword is critical, as it also allows RealURL 
to know that there's something to decode on the way back (I mean, when 
it detects the keyword "plads" in the URL, it knows the next segment is 
an alias and tries to match it back to a uid, so that the right detail 
view is displayed).

HTH

-- 

Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch


More information about the TYPO3-english mailing list