Open webacers opened 8 years ago
I think it's more complicated. You have to integrate how this lib render a page with multi_level_menu menu' lib render sistem.
This issue should be due to, the '$this" variable in views is not exactly a CI instance; instead, it belonged to the Plates template engine.
However, I have removed the Plates engine recently, and keep it more CodeIgniter-style to avoid unnecessary dependency. Please pull the latest code and let me know if the issue still exist.
Hi,
I'm trying to integrate multi level menu from https://github.com/edomaru/codeigniter_multilevel_menu
Added following code to MyController _setup function
$this->load->model("menu_model", "menu"); $items = $this->menu->all();
// load the library and pass the array data $this->load->library("multi_menu"); $this->multi_menu->set_items($items);
And in /layouts/default.php I've added <?php echo $this->multi_menu->render(); ?> But I am getting following error .
Severity: Notice Message: Undefined property: League\Plates\Template\Template::$multi_menu Filename: _layouts/default.php
Can anyone guide me how to set the variable.
Thanks