How to use the CakePHP function called generatetreelist? -


i new cakephp , function please me can.

generatetreelist(null, null,'{n}.category.name', '  - '); 

this shows categories name , childrens perfect want show fields of categories in index.ctp. example name(already showing), status. if solve problem? please it... in view used:

foreach($categories $key=>$value) {     echo $value;//it shows name..  } 

in controller:

$ncategories = $this->category->generatetreelist(null, '{n}.category.id','{n}.category.name', '  - ');                     $this->set(compact('ncategories',$this->paginate('category')));  

you want use find('threaded'), not generatetree list ()


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -