Changes between Version 2 and Version 3 of Howto/Navigation/WorkingWithCategories

Show
Ignore:
Author:
demian (IP: 81.1.88.89)
Timestamp:
08/09/06 09:30:05 (7 years ago)
Comment:

removed ANCIENT globals ref, introduced ground-breaking OO concepts

Legend:

Unmodified
Added
Removed
Modified
  • Howto/Navigation/WorkingWithCategories

    v1 v3  
    3434Don't forget to rebuild the Data Objects! 
    3535 
    36 TBC [/WernerKrauss WernerKrauss] /22.08.2005 16:33/ 
    37  
    3836== Code inside your modules == 
    3937To use categories inside your modules you have to include /navigation/classes/!CategoryMgr.php: 
    5452 
    5553{{{ 
    56     function _generateCategoryArray(
     54    function _generateCategoryArray($rootCatId
    5755    { 
    5856        $menu1 = & new MenuBuilder('SelectBox'); 
    59         $menu1->setStartId($GLOBALS['_SGL']['CONF']['EventMgr']['rootCatID']); 
     57        $menu1->setStartId($rootCatId); 
    6058        $aHtmlOptions = $menu1->toHtml(); 
    6159        return $aHtmlOptions; 
    6664 
    6765{{{ 
    68 $output->aCategories = _generateCategoryArray(); 
     66$output->aCategories = $this->_generateCategoryArray($rootCatId); 
    6967}}} 
    7068 
    7371 
    7472{{{ 
    75 $output->aCategories = _generateCategoryArray(); 
     73$output->aCategories = $this->_generateCategoryArray($rootCatId); 
    7674$output->currentCat = $event->category_id; 
    7775}}}