Almost - except 1 issue.
- I need to dynamically bind the menus.
The method you provided works… but also requires an interaction to trigger for both DIV’s.
Because of this - it has be to done at development time… and cannot be done at run-time.
The menu system I am developing is created on-the-fly from a database (php / angularjs / mysql).
The available menu options are created based on the user’s authentication level and
- the available menus options can change based on the user… in addition to authentication level.
So… a person with User Level 2… may have “these 20 options”…
and another person at User Level 2… has “these 15 options”…
all of which overlay the available “30 options”.
Another way of looking at this is…
- Admin can grant Admin Access to another person.
- It’s generally assumed… Admin controls everything.
But - In the application I’m developing…
- An Admin can assign a new Admin… but with limited / selected Admin capabilities.
- for example… “the new Admin cannot create a new Admin”.
The code itself is already developed.
- (As much as possible) I’m trying to keep the interface and css within Webflow.
- Otherwise… (should there be a design change) I have to manually update non-visual code.
- which can be a pain in the buttholious.
(Unless Webflow’s changed this recently) Webflow stores the interaction / trigger code in seperate .js file.
I’ve ripped this js file apart a thousand times - and have been unable to dynamically add interactions and triggers at run-time.
Here’s an example: (it’s a bit convoluted)
I want an interaction base on a user level 1.
I want a different interaction based on user level 2.
I can create both interactions - but I must bind them to an element for the trigger to exist.
I review the JS and cut / save the interaction / trigger code into a localized “include file”.
Based on the user level… I dynamically insert the code… but the problem is
it appears the interaction are read at load - and cannot be dynamically added.
Or maybe they can… I just haven’t had the time to find the solution
I still hope @Webflow releases the new feature…
BUT NONE THE LESS…
- this solution will definitely work for static pages
@Waldo Excellent Solution - YOU ARE AWESOME !!!
and more importantly…