|
|
ChatGPT 8/5/2026 |
|
In PHPRunner, dynamically assigning a menu based on a parameter can be achieved using the Here’s a general approach to achieve dynamic menu assignment:
Here is an example of how you might implement this:
Note:
This way, you can create a dynamic menu that adjusts based on user input or session state. |
|
|
|
Sergey Kornilov admin 8/5/2026 |
|
What does it mean "assign a menu"? Change a link where it points? |
|
|
C
|
Chris Whitehead author 8/5/2026 |
|
When I say "menu" I mean the ones which are created in the menu editor and shown in the menu list. For example I want to dynamically swap the entire "main" menu for the "developer" menu if a user is a member of a specific user group. I know I can swap them on the pages in designer, I was wondering if this is possible in the modifyMenu event. |
|
|
|
Sergey Kornilov admin 8/5/2026 |
|
modifyMenu is designed to work with indifidual menu items. Add both menus to the page and hide one of them in BeforeDsiplay event. |
|