Keeping parent menu items active in child pages |
Helo, I have this array of navigation from db, and i've already prepare the array in parent child format. So my question is, how do i keep the parent menu active when i visit the child pages. i'm using Codeigniter. the slug is dynamically defined by the user in admin panel.
here is my dummy array: PHP Code: array(3) { here is my routes setup to grab the page: PHP Code: $route['([a-zA-Z0-9_-]+)'] = 'pages/render'; for now i only success to get the menu active when visiting the root page by compare the slug with uri_segment(1) with this function: PHP Code: function get_menu ($array, $child = FALSE) Please let me know what is the correct way to achive this. Thank you very much |
Messages In This Thread |
Keeping parent menu items active in child pages - by ahmadmilzam - 11-16-2014, 10:42 AM
RE: Keeping parent menu items active in child pages - by alroker - 11-16-2014, 12:32 PM
RE: Keeping parent menu items active in child pages - by ahmadmilzam - 11-16-2014, 06:27 PM
RE: Keeping parent menu items active in child pages - by Hobbes - 11-17-2014, 12:02 PM
RE: Keeping parent menu items active in child pages - by ahmadmilzam - 12-18-2014, 03:48 AM
RE: Keeping parent menu items active in child pages - by InsiteFX - 12-18-2014, 05:18 AM
RE: Keeping parent menu items active in child pages - by apparasenal - 12-18-2014, 11:41 PM
RE: Keeping parent menu items active in child pages - by _this - 12-19-2014, 02:04 AM
|