[TYPO3-commerce] Navigation multilanguage

Daniel Zerlett d.zerlett at medienkraftwerk.de
Mon Feb 26 17:25:06 CET 2007


Hello everybody

My TS creates two menus from the shop extension

   1. Category menu
      In this menu only the main categories are shown, no sub-categories

   2. rootline menu
      Shows the rootline of the categories


The Category menu shows me only the titles in the default language.
The rootline menu works perfect with multilanguage.

Any ideas ?

Thank You !




SOURCECODES
-----------

* TypoScript Category menu:

comnav_top = HMENU
comnav_top {
  special = userfunction
  special.userFunc = tx_commerce_funcs->init_top
  special{
   category = {$plugin.tx_commerce_lib.catUid}
   showProducts = 0
   overridePid = {$plugin.tx_commerce_lib.overridePid}
  }

  1 = GMENU
  1 {	
   itemArrayProcFunc = tx_commerce_funcs->clear		
   NO = 1
   NO {		
    XY = 133,29
    wrap = <div id="navtopitem">|</div>      				
    10 = TEXT
    10 {
     align = center
     text.field = title
     offset = 0,24
    }
   }
  }
}

* PHP code function init_top:

class tx_commerce_funcs extends tx_commerce_navigation {
	
   function init_top($content,$conf) {
     $tmp = tx_commerce_navigation::init($content,$conf);		

     // Mark items as active  	
     foreach($tmp as $k=>$v) {
       if (in_array($k,$this->pathParents)) {
         $tmp[$k]['ITEM_STATE'] = "ACT";
       }
     }    		
     return $tmp;
   }
}

* TypoScript Rootline menu:

navroot = COA
navroot {
    10 = HMENU
    10 {
       special=rootline
       special.range = 1|-1
       1 = TMENU
       1 {
          NO {
            allWrap = |*| |&nbsp;&gt;&nbsp; |*| |
          }
       }
    }

   20 < lib.tx_commerce.rootline
   20 {
      special.range = 1|-2
      1 = TMENU
      1 {
          NO {
            allWrap = |*| |&nbsp;&gt;&nbsp; |*| |
          }
       }
    }
}


More information about the TYPO3-project-commerce mailing list