I’m having doubts about manipulating the child menu items to improve the display style.
I am currently generating according to documentation:
function index() {
$this->set('list', $this->Categories->find('treeList'));
$this->set('Categories', $this->Categories->find("all"));
}
<?php
foreach($list as $item){
echo "<li>".$item."</li>";
}
?>
The display is in this format:
My Categories
_Fun
__Sport
___Surfing
___Skating
_Trips
__National
__International
I tried:
$this->set('list', $this->Categorias->find('children', ['for' => 1])->find('threaded')->toArray());
But that way he only gets the parent menu.
If I can manipulate the child items I can generate a dropdown style or something to improve the menu. I appreciate any comments.