app\controllers\components:
<?php class MenuComponent extends Object { var $controller = true; /** * Startup method * Called automatically, used to set the variable to define the menu. * Could equally be used to define a context menu, based upon the controller nam
e and action. * * @return null */ function startup(&$controller) { $this->controller = &$controller; $this->controller->set('MenuItems',$this->controller->Category->findAll()); } /** * Check groups * Perform any logic desired to delete groups. * In this code, if a group is defined which is not a link and has no children i
t is removed * * @param array $menu * @return array */ } ?>
oraz stworzyłem model do obslugi kategorii
app\models:
<?php class Category extends AppModel { var $name = 'Category'; } ?>
Problem polega na tym , że nie wiem jak dostać się do tego modelu od strony komponentu
