[TYPO3-commerce] Building navigation menu using itemArrayProcFunc
Franz Koch
typo.removeformessage at fx-graefix.de
Mon Nov 5 10:03:25 CET 2007
Hi Jeroen,
> After some code changing The result that the menu Items are without a
> category title.
>
> The TS (as you suggested):
> lib.topmenu.2 = TMENU
> 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}
> }
>
> wrap = <ul class="level2">|</ul></li>
> NO {
> allWrap = <li>|</li>
> }
> }
>
> The PHP:
> function user_menu($menuArr,$conf){
> //Only for commerce categories
> if($menuArr[0]['pid']==404){
> $indexerObj = &t3lib_div::makeInstance('tx_commerce_navigation');
> $menuArr = $indexerObj->init('',$conf);
> }
> return $menuArr;
> }
>
> I do get my six rows (There are six categories) in my list only without
> category titles. Have you got any idea?
sorry - can't tell right away and I don't have the possibility to test
that. I'd suggest to do some debugging with the $menuArr in your php
function. Debug the incoming array and compare it with the array coming
from $inderxerObj. Maybe the TMENU needs a little bit different
structure than the HMENU - I'm not sure.
Hope that helps.
--
Greetings,
Franz
More information about the TYPO3-project-commerce
mailing list