[TYPO3-commerce] Extend menu with categories

Jeroen Visser jeroen at roquin.nl
Tue Oct 2 16:17:03 CEST 2007


Hello,

Does anyone has some experience with adding the categories, made in 
commerce, to a page menu item? For example the menu should look like this:

START  ABOUT  PRODUCTS  CONTACT
               cat1
               cat2
               cat3

It is a horizontal menu. I've found a example that first gets the 
categories to and adds them to the menu. I have got this working with a 
vertical menu.
In my TV template I have mapt on "lib.topmenu"
I hope someone could help me out. Below the TS, with the temp.catmenu 
coming from a example.


temp.catmenu = HMENU
temp.catmenu {
   special = userfunction
   special.userFunc = user_tx_commerce_catmenu_pub->init
   special {
     category = {$plugin.tx_commerce_lib.catUid}
     showProducts = 1
     overridePid = {$plugin.tx_commerce_lib.overridePid}
   }

   1 = TMENU
   1 {
     wrap = <ul class="mainmenu">|</ul>
     itemArrayProcFunc = user_tx_commerce_catmenu_pub->clear
     expAll = 1
     noBlur = 1
     NO.wrapItemAndSub = <li>|</li>
     ACT = 1
     ACT.wrapItemAndSub = <li>|</li>
//    ACT.ATagTitle.field = subtitle // title
//   ACT.ATagParams = class="act"
//    ACT.stdWrap.htmlSpecialChars = 1
//    ACT.doNotLinkIt = 1
   }
	
   2 < .1
   3 < .1
}

/* MY MENU */
lib.topmenu = HMENU
lib.topmenu.excludeUidList = 347
lib.topmenu.special = directory
lib.topmenu.special.value = 347
lib.topmenu.1 = TMENU
lib.topmenu.1 {
         itemArrayProcFunc = user_act
	wrap = <ul class="level1">|</ul>
	expAll = 1
	NO {
		allWrap = <li>|</li>
	}
   2 < .1
   3 < .1
}

# Vanaf PID 404 (Catalogus) subcategorieën toevoegen
[PIDinRootline = 404]
lib.topmenu.1 {
   ACT {
     after.cObject = HMENU
     after.cObject < temp.catmenu
   }
}

Thanks in advance.

Regards,
Jeroen




More information about the TYPO3-project-commerce mailing list