Sitemap visibility on two state switches

Hi.

Is it possible to have some conditional jump for masking some sitemap lines ?

I have a toogled switch button in sitemap
I need to mask both lines, if usercode is not equal 1.

Only one line shall be displayed if usercode equal 1
and nothing shall be displayed if usercode is not equal 1

Switch item=TRANSFER mappings=[OFF="OFF"] icon="battery" visibility=[usercode==1, TRANSFER==ON]
Switch item=TRANSFER mappings=[ON="ON"] icon="battery" visibility=[usercode==1, TRANSFER==OFF]

Thanks.

See:


In particular the last paragraph.
What you are trying to do is an AND in the visibility conditions and the sitemaps don’t support that.
You will need to create and rule and use a third “dummy” item to set the visibility.

Thanks, solved with Frame visibility

Frame visibility=[userlevel==1] {
Switch item=TRANSFER mappings=[OFF="OFF"] icon="battery" visibility=[TRANSFER==ON]
Switch item=TRANSFER mappings=[ON="ON"] icon="battery" visibility=[TRANSFER==OFF]
                               }
3 Likes

Clever way to kind of create an AND condition in the sitemap. Good