I have a header with multiple buttons so I can navigate different screens. I want the current screen button to be active. This is normally very easy with CSS but I am not seeing how to do this in Ignition.
I have a Session custom property called PrimaryView and every main screen when opened has a script to change that custom property value. On my header i've set up the buttons so that they are shown as active whenever their corresponding PrimaryView is on. Not elegant at all but it doesn't give me problems.
you can set it on startup script
Better to use a binding rather than an event handler if you want to guarantee it's set correctly.
Don't use session customs and scripts for this.
Pages have a primaryView
property that you can use. Just bind the button's style/class against that property.
2 Likes