We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23496
    • 20 Posts
    Hello modx-Users,

    in modx 2.2.6 the Output-Filter Math has been removed.
    I am looking for an alternative for a code like this:

    <div [[+idx:math=`(?+1)%3`:is=`3`:then=`class="innerModuleItem2Col innerModuleItemFile innerModuleItemFileLast clearfix"`:else=`class="innerModuleItem2Col innerModuleItemFile clearfix"`]]>


    Regards
    Florian
      • 40706
      • 128 Posts
      I dont know how this could ever work. Modulus never could give its operator value back.

      But this sould:
      <div [[+idx:incr:mod=`3`:is=`0`:then=`class="innerModuleItem2Col innerModuleItemFile innerModuleItemFileLast clearfix"`:else=`class="innerModuleItem2Col innerModuleItemFile clearfix"`]]>
        • 23496
        • 20 Posts
        Thank you, Michael. That's it smiley