Miwa
August 2, 2020, 8:36am
1
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,
Teodor
August 2, 2020, 8:45am
2
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">
Miwa
August 2, 2020, 8:47am
3
I tried that one too, and it didn’t work…
Teodor
August 2, 2020, 8:50am
4
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
Miwa
August 2, 2020, 8:56am
5
Thanks a lot! it worked now!
1 Like