Hi all,
I need to design a database driven menu.
After quering a database table i want to create y menu in a repeat sequence.
Doing this with only browser.goto redirection is quite easy. But in my case, some entries of the menu must redirect to an url and some other must for example, open a modal box via a onclick action.
First difficulty, i can bind the onclick action. Seoncdly how to state and if condition and bind either the onclick action, either the browser.goto.
Maybe i’m wrong in my menu conception and should reconsider this…
Thank’s for your suggestions
Hi Georges,
I’ve done a dynamic menu before and regretted it. It added complexity to the app when in the end, the menu did not change as often as I thought it might. I don’t know your use case, but we always have to consider wether the added complexity is really warranted – I forget this sometimes.
–Ken
Thank’s for you suggestion. It defenitly ispires me. Yes of course, why generating a menu from scratch when i can just desing a complete static menu and just hide items when needed depending on rights stored in the database. Just one attribute to bind.
Easy and suits to my current needs, considering the kind of application i’m developping. However, it’s not very secured as a user can hide/unhide options via the browser debugger and then access to forbiden functionnalities, isn’t it ?
As you certainly guessed, my problem deals with users profiles and rigths in the application (and of course access to menu options). Which workaround did you find ?
I hide/show menu options but only for the purpose of only showing viable options, not to protect/restrict access to sensitive material, etc. That type of protection is better done through the security enforcement of pages.
Still rigth, I have to deepen this theme
Me too! I’m in the process of reverting that cute disaster. It looked cool at first, but the edits became a pain!