Welcome Guest, Not a member yet? Register   Sign In
Menu
#1

Good evening,

I have another problem I use HMVC for my project CodeIgniter, however my modules allow to have menu for example "The last articles" how can I display these menus on all the pages of my site? I specify that each module can have its own menu, in my controller I have a function public function menu () which allows to create a menu for the module, but I want this menu to appear on all pages of my site , how can I do that?

Thank you
Reply
#2

Pass the menu to the $data['menu'] variable in the method you display your page view.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

Hello, I misspoke

I use CodeIgniter in HMVC, so that I have modules files with controllers, in each controller I have a "Menu" function that allows to get the latest articles of the site, the latest forum topics etc. (So I use smarty, in each module I have a folder views with different views including mini-menu.tpl) and I have a template with the Smarty library, so I would like to savor if you know a way to 'show these menu in my menu-left.tpl file with genre {INCLUDE MENU} which would include the different menu

Thanks for your help
Reply
#4

Here is a diagram of what I would like to do

[Image: Capture.png]
Reply
#5

I do not use Smarty so not sure if it has a method or function to load another template.

I usually create a menu library then loads a menu name and then the menu items for that menu name.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB