ci_bootstrap_3 icon indicating copy to clipboard operation
ci_bootstrap_3 copied to clipboard

Multi Level Menu

Open webacers opened this issue 9 years ago • 2 comments

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

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

webacers avatar Dec 22 '15 10:12 webacers

I think it's more complicated. You have to integrate how this lib render a page with multi_level_menu menu' lib render sistem.

buoncri avatar Dec 24 '15 07:12 buoncri

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.

waifung0207 avatar Feb 17 '16 08:02 waifung0207