Welcome Guest, Not a member yet? Register   Sign In
multi level menu with codeigniter
#3

I would recommend taking the HTML/formatting out of the model as a starting point. If you can create a library/helper with a method/function which simply takes an array and returns a formatted string for output, it should simplify the problem for you. Then your model can retrieve the data from the database and return a multidimensional array, e.g.
Code:
array(
    'menu 1',
    'menu 2',
    'menu 3' => array(
        'submenu 1',
    ),
    'menu 4' => array(
        'submenu 1',
    ),
)
Reply


Messages In This Thread
RE: multi level menu with codeigniter - by mwhitney - 07-14-2015, 09:50 AM
RE: multi level menu with codeigniter - by Athov - 07-15-2015, 02:52 PM



Theme © iAndrew 2016 - Forum software by © MyBB