App Connect Bootstrap 4 Navigation Support Product Page


Do you a recommended method to use for a common or shared menu?

Asked 21 Mar 2018 18:23:33
has this question
21 Mar 2018 18:23:33 Lee Woolsey posted:
What is the best method for using a common "menu file" for use on multiple pages? I've used the interface to create a structure, then cut and paste it into a separate "include" file (using php require_once) of course, after doing this, I can not longer use the interface to update and edit my menu structure.

Any suggestions for a better way to achieve this?


Replied 21 Mar 2018 18:46:58
21 Mar 2018 18:46:58 Teodor Kuduschiev replied:
Hi Lee,
That is the recommended method for using the generated menu code in an include.
For changes you will have to manually add/remove items to the menu, as the UI requires the menu to be on the page and not in an include.
Replied 21 Mar 2018 19:57:42
21 Mar 2018 19:57:42 Lee Woolsey replied:
Thank you. (I was hoping you had some super-cool alternative)
Replied 23 Mar 2018 06:27:42
23 Mar 2018 06:27:42 Greta Garberini replied:
I would use a database table for most, if not all elements and populate it dynamically. Not use any includes.

Just look at the structure. It might suffice to have only id, parent, title where parent=0 would be the main categories

my 2c opinion
Replied 23 Mar 2018 07:22:41
23 Mar 2018 07:22:41 Teodor Kuduschiev replied:
Hi Greta,
That's just fine, the question here is related to how to re-use the menu HTML structure across the pages

Reply to this topic