[TYPO3-english] Realurl problem with two producttypes

Morten Hagh morten at hagh.dk
Wed Feb 8 14:00:02 CET 2012


Wait a minute -

I think it works with

'produkt' => array(
	array(
    	'GETvar' => 'tx_saerpartier_pi1[produkt]',
	),
	array(
		'cond' => array('prevValueInList' => 'tagsten'),
		'GETvar' => 'tx_saerpartier_pi1[rtnummer]',
		'lookUpTable' => array(
			'table' => 'tx_saerpartier_tagsten',
		    'id_field' => 'rtnummer',
		    'alias_field' => 'rtnummer',
		    'addWhereClause' => ' AND NOT deleted',
		    'useUniqueCache' => 1,
		    'useUniqueCache_conf' => array(
		    	'strtolower' => '1',
		    	'spaceCharacter' => '-'
		    )
 		),
	),
	array(
		'cond' => array('prevValueInList' => 'mursten'),
		'GETvar' => 'tx_saerpartier_pi1[rtnummer]',
		'lookUpTable' => array(
			'table' => 'tx_saerpartier_mursten',
		    'id_field' => 'rtnummer',
		    'alias_field' => 'rtnummer',
		    'addWhereClause' => ' AND NOT deleted',
		    'useUniqueCache' => 1,
		     'useUniqueCache_conf' => array(
		     	'strtolower' => '1',
		        'spaceCharacter' => '-'
		  	)
		),
	),
),

Does this look as the right way?

/Morten Hagh

> Hi list,
>
> I have a problem I can't figure out how to solve.
>
> I have a ext. called tx_saerpartier that can display either a brick or a
> rooftile taken from the tables:
>
> tx_saerpartier_mursten (bricks) or tx_saerpartier_tagsten (rooftiles)
>
> What I want is to configure realurl so that I can get a nice looking URL
> based on the producttype chosen, like:
>
> /saerpartier/show-saerparti/product/brick/xxx/
>
> But I can only get the URL to be like:
>
> /saerpartier/show-saerparti/product/brick/rooftile/xxx/ (both producttypes
> in the url)
>
> and that is not what I want.
>
> The product is taken from
> tx_saerpartier_pi1[product] which can be brick or roofile
>
> I tried with
>
> 'product' => array(
> 	array(
> 		'GETvar' => 'tx_saerpartier_pi1[product]',
> 	),
> ),
> 'rooftile' => array(
> 	array(
> 		'GETvar' => 'tx_saerpartier_pi1[rtnummer]',
> 		'lookUpTable' => array(
> 			'table' => 'tx_saerpartier_tagsten',
> 		    	'id_field' => 'rtnummer',
> 		        'alias_field' => 'rtnummer',
> 		        'addWhereClause' => ' AND NOT deleted',
> 		        'useUniqueCache' => 1,
> 		        'useUniqueCache_conf' => array(
> 		        	'strtolower' => '1',
> 		            'spaceCharacter' => '-'
> 	       	)
> 	   	),
> 	),
> ),
> 'brick' => array(
> 	array(
> 		'GETvar' => 'tx_saerpartier_pi1[rtnummer]',
> 			'lookUpTable' => array(
> 		    	'table' => 'tx_saerpartier_mursten',
> 		        'id_field' => 'rtnummer',
> 		        'alias_field' => 'rtnummer',
> 		        'addWhereClause' => ' AND NOT deleted',
> 		        'useUniqueCache' => 1,
> 		        'useUniqueCache_conf' => array(
> 		        'strtolower' => '1',
> 		        'spaceCharacter' => '-'
> 		 	)
> 		),
> 	),
> ),
>
> But that gives me both product types in the URL.
>
>
> /Morten Hagh
>
>
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
>


--
MVH
Morten Hagh


More information about the TYPO3-english mailing list