plonediazo

Multiple Conditions in Diazo


I have a rule set in diazo where I want to say

"if there is no "#portal-column-two" AND also no "#portal-column-one" then do X" It seems to me the rule for that would look something like

<rules css:if-not-content="((#portal-column-one) and (#portal-column-two))"> blah </rules>

Ive looked at the documentation and cant find anything obvious. I think I can wrap the rule sets like this;

<rules css:if-not-content="#portal-column-one">
<rules css:if-not-content="#portal-column-two">
blah
</rules>
</rules>

But that seems somewhat inelegant. Id think I should be able to put that into one line right?

Thoughts? Thanks


Solution

  • You just need to do::

    <rules css:if-not-content="#portal-column-one,#portal-column-two"> blah </rules>
    

    It's just a css selector. If the selector is empty, the rules are applied.