Conditional Region Question

#1

Hi,

i have a problem with 2 conditional regions in a content page.

<div id="condPersDok" is="dmx-if" dmx-bind:condition="params.id == (&quot;abrechnung&quot; || &quot;wirtschaftsplan&quot;)"></div>

and

<div id="condAllgDok" is="dmx-if" dmx-bind:condition="params.id != (&quot;abrechnung&quot; || &quot;wirtschaftsplan&quot;)"></div>

I only get the correct results for “abrechnung” and not “wirtschaftsplan”. What am I doing wrong?

#2

Hi Marcel,
Your expression is wrong, must be:

<div id="condPersDok" is="dmx-if" dmx-bind:condition="params.id == 'abrechnung' || params.id == 'wirtschaftsplan')"></div>

#3

Thank you Teodor,

you brought me in the right direction:

This works:

<div id="condAllgDok" is="dmx-if" dmx-bind:condition="params.id != 'abrechnung' && params.id != 'wirtschaftsplan'"></div>

and

<div id="condPersDok" is="dmx-if" dmx-bind:condition="params.id == 'abrechnung' || params.id == 'wirtschaftsplan'"></div>

1 Like