How to set dmx-show correctly

Hello

This “dmx-show” doesn’t work as I expect, what should I do then?
I would like to show this swiper only when idstyleapplicationmaster=2.

<div is="dmx-swiper" id="swiper1" auto-height="true" centered-slides="true" dmx-bind:slides="serverconnect1.data.query_entryfiles" speed="600" grab-cursor="true" loop="true" pagination="bullets" navigation="true" dmx-show="(serverconnect1.data.query_event_info.idstyleapplicationmaster==2'">

Thanks,

You have a syntax error in the expression. There’s a single quote at the end, which should not be there.
The right syntax is:

dmx-show="serverconnect1.data.query_event_info.idstyleapplicationmaster == 2">

I tried that one too, and it didn’t work…

In my opinion it’s better to add a conditional region and move the swiper inside, instead of using a dmx-show.
This way it won’t be rendered when the condition is not met.

1 Like

Thanks a lot! it worked now!

1 Like