menua and drop down menu
Can anyone tell me function of how i can automatically generated menu and sub menu from admin panel for public side web and also make table in database..?
Can anyone tell me function of how i can automatically generated menu and sub menu from admin panel for public side web and also make table in database..?
One way is to make a single table with a field "parent_id" holding the id of the 'menu' id. Top level items have parent_id set to 0.
e.g.
id | label | url | title_text | parent_id
Otherwise you could create two tables: menu and submenu:
parent_id | label | url | title_text
and
child_id | label | url | title_text | parent_id
However, you may find it easier to hardcode an array in a config file. BUT it isn't easy to edit fromn admin area form.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.