[TYPO3-commerce] Building navigation menu using itemArrayProcFunc
Jeroen Visser
jeroen at roquin.nl
Sun Nov 4 17:25:15 CET 2007
Hi all,
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"
TS looks like this:
lib.topmenu.2 = TMENU
lib.topmenu.2 {
itemArrayProcFunc = user_menu
}
The php looks like this:
function user_menu($menuArr,$conf){
if($menuArr[0]['pid']==404){
$indexerObj = &t3lib_div::makeInstance('tx_commerce_navigation');
$conf['special']='userfunction';
$conf['special.userFunc']='user_tx_commerce_catmenu_pub->init';
$conf['special.'] =
array('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');
$conf['1']='TMENU';
$conf['1.itemArrayProcFunc']='user_tx_commerce_catmenu_pub->clear';
$conf['2']='TMENU';
$conf['2.itemArrayProcFunc']='user_tx_commerce_catmenu_pub->clear';
$conf['3']='TMENU';
$conf['3.itemArrayProcFunc']='user_tx_commerce_catmenu_pub->clear';
$cat_arr = $indexerObj->init('',$conf);
return $cat_arr;
}
}
I have taken the typoScript from examples within lib.tx_commerce.navigation
The ERROR that I get from TYPO is:
No category defined in TypoScript:
lib.tx_commerce.navigation.special.category
********* TABLE **********
parentObj Object
special userfunction
special.userFunc user_tx_commerce_catmenu_pub->init
special.
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
1 TMENU
1.itemArrayProcFunc user_tx_commerce_catmenu_pub->clear
2 TMENU
2.itemArrayProcFunc user_tx_commerce_catmenu_pub->clear
3 TMENU
3.itemArrayProcFunc user_tx_commerce_catmenu_pub->clear
1.
itemArrayProcFunc user_tx_commerce_catmenu_pub->clear
2.
itemArrayProcFunc user_tx_commerce_catmenu_pub->clear
3.
itemArrayProcFunc user_tx_commerce_catmenu_pub->clear
Looking forward to some reactions.
Kind regards,
Jeroen Visser
More information about the TYPO3-project-commerce
mailing list