[TYPO3-commerce] Building navigation menu using itemArrayProcFunc

Franz Koch typo.removeformessage at fx-graefix.de
Sun Nov 4 23:54:15 CET 2007


Hi,

> Maybe someone could help me out here. I am building a category 
> dropdownmenu for commerce.  When I return the array from the function I 
> get errors like: "Error in the typoScript configuration"

>     $conf['special.userFunc']='user_tx_commerce_catmenu_pub->init';

using 'special.userFunc' as array key won't work. You have to add the 
definition of the userfunc to the array you apply to 'special.' - like:
----
$conf['special.'] = array(
	'userFunc' => 'user_tx_commerce_catmenu_pub->init',
	'category'=>'{$plugin.tx_commerce_lib.catUid}',
	'showProducts' => 0,
	'overridePid' => '{$plugin.tx_commerce_lib.overridePid}',
	'displayManuForCat' => '<',
	'useRootlineInformationToUrl' => 
'{$plugin.tx_commerce_lib.useRootlineInformationToUrl}',
	'1'=>'TMENU','2'=>'TMENU','3'=>'TMENU'
);
----

but why do you define all this stuff in php and not in your TS? And I'm 
really not sure if you can work with constants from inside php - I guess 
there is your main problem. Try setting this in TS:

----
lib.topmenu.2 {
   itemArrayProcFunc = user_menu
   itemArrayProcFunc {
     userFunc = user_tx_commerce_catmenu_pub->init
     category = {$plugin.tx_commerce_lib.catUid}
     showProucts = 0
     overridePid = {$plugin.tx_commerce_lib.overridePid}
     useRootlineInformationToUrl = 
{$plugin.tx_commerce_lib.useRootlineInformationToUrl}
   }
}
----

Anyway - I don't get it why you are using your own itemArrayProcFunc to 
just call another itemArrayProcFunc from within your php. But I don't 
have to understand everything :)

--
Greetings,
Franz


More information about the TYPO3-project-commerce mailing list