We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1526
    • 72 Posts
    I want no output if the value is empty or zero. This is the code I used:
            [+maxigallery.picture.depth:isnot=``:or:is=`0`:then=`
                <li title="depth">[+maxigallery.picture.depth:htmlent+]d </li>
            `+]

    but I get always the unwanted output. What's wrong?
    I also tested this code, where I would like to suppress any ouput if the values are not present:
    [+maxigallery.picture.width:isnot=``:and:
    maxigallery.picture.height:isnot=``:and:
    maxigallery.picture.depth:isnot=``:and:
    maxigallery.picture.units:isnot=``:
    then=`output`+]
    but I have no output both with any value present that none.
    What's wrong with my code? thank you
    [ed. note: andrearicci last edited this post 12 years, 1 month ago.]
      MODx evo 1.5~1.6 ✪ Apache v 2.2.22 ✪ PHP v 5.3.10 ✪ MySQL v 5.1.61
      <°'iiii);
      • 22427
      • 793 Posts
      Shouldn't it be
      :isnot=``:and:isnot=`0`
      instead of
      :isnot=``:or:is=`0`
      ?
        • 1526
        • 72 Posts
        yes, thank you!
        and the second has to be
        :isnot=``:or:
        in place of
        isnot=``:and:
          MODx evo 1.5~1.6 ✪ Apache v 2.2.22 ✪ PHP v 5.3.10 ✪ MySQL v 5.1.61
          <°'iiii);