Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi Level Menu #35

Open
webacers opened this issue Dec 22, 2015 · 2 comments
Open

Multi Level Menu #35

webacers opened this issue Dec 22, 2015 · 2 comments

Comments

@webacers
Copy link

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

@buoncri
Copy link

buoncri commented Dec 24, 2015

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

@waifung0207
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants