Welcome Guest, Not a member yet? Register   Sign In
Routing on sub level menus
#1

Hi everyone,

I'm a newbie with Codeigniter and am on my second attempt at a project. I've been really impressed with how easy it was to set up my views and database queries. However I'm stuck with my menu routing.

I have a menu with 4 levels such as:

accessories > audio-accessories > earpieces  > brand
accessories > batteries > nimh  > brand

etc

All are index pages.

I've followed the Codeigniter tutorial and have all my first level pages set up and working but after setting up a controller and routes for accessories I manage to get the first sublevel working but when trying the next using the same format I fail. I'm clearly missing something really fundamental.

Is anyone aware of a tutorial, or examples to do something like this?

Thank you in advance for any help or advice.

Alan
Reply
#2

Read this, it may help you out.

Revisiting the multilevel menu in PHP with some additional code (as in… Bootstrap CSS)
What did you Try? What did you Get? What did you Expect?

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

(04-25-2018, 04:13 AM)InsiteFX Wrote: Read this, it may help you out.

Revisiting the multilevel menu in PHP with some additional code (as in… Bootstrap CSS)

Hi InsiteFX,

Thanks for your reply - a very useful article and I may have a play with this on something else I have coming up but I may not have been clear on what I was stuck with.

I already have the menu in place. I need to be able to route to the views. I'm OK with routing for base level urls such as home, about, contact etc as I have a page controller for that. I'm stuck with creating the routing to the 3 sub levels in the menu.

Thanks for taking the time to look though.

Regards,

Alan
Reply
#4

You can use CodeIgniter's anchor Method in the url helper for that.

SEE: CodeIgniter User's Guide

anchor
What did you Try? What did you Get? What did you Expect?

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

(04-26-2018, 03:52 AM)InsiteFX Wrote: You can use CodeIgniter's anchor Method in the url helper for that.

SEE: CodeIgniter User's Guide

anchor

Hi InsiteFX,

Thankyou!

I'll take a look at this.

Regards,

Alan
Reply




Theme © iAndrew 2016 - Forum software by © MyBB