1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 |
<?php
#plugins/fox/models/fox_category.php
class FoxCategory extends AppModel {
var $name = 'FoxCategory';
}
?>
<?
#plugins/fox/elements/fox_menu.ctp
$FoxCategory = ClassRegistry::init('FoxCategory', 'Model');
$menus = $FoxCategory->children($lang_id['FoxCategory']['id'], true);
$parents = $FoxCategory->getpath($this->passedArgs['0']); //<- id for fun
foreach ($menus as $menu) {
.....
}
?>
/*
PROBLEM: $FoxCategory = ClassRegistry::init('FoxCategory', 'Model'); line, can`t call var $actsAs = array('Tree'), if cake is not in fox_categories_controller.php, which includes this model good.
*/ |
