We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22244
    • 144 Posts
    I want to test for multiple values from TV checkboxes to be true/selected. But after 4 hours I give up.
    Please somebody can you point me in the right direction as there is not much documentation on this and I'm stuck.

    [[*showteaser1:is=`[[$teaser1]]`:and:*showteaser2:is=`[[$teaser2]]`:and:*showteaser3:is=`[[$teaser3]]`:then=`right`]]
      • 3749
      • 24,544 Posts
      Even if that worked it would be fairly slow.

      A custom snippet is probably what you want, but do you really want to just print the word 'right' if all four of those TVs are set?


      ---------------------------------------------------------------------------------------------------------------
      PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
      MODX info for everyone: http://bobsguides.com/modx.html
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 22244
        • 144 Posts
        I'm using the code to set a class in a chunk for teasers on the frontpage. These teasers can be activated/ deactivated and depending on their position the last and the 4th one need a margin.
        The first can be solved with css(2). The 4th also with css3 but the older browsers will not support this.
        So far the output modifier approach was not successful so I will just stick with css3 and check it again later.
          • 22244
          • 144 Posts
          Hi BobRay, I have been thinking about your remark to make a custom snippet instead of using these modifiers. But if you have 4 different chunks with different variables would this mean you need to make 4 different snippets?
          Chunk 1 needs image1 and link1 and Chunk 2 needs image2 and link2.
            • 3749
            • 24,544 Posts
            Sorry, I'm still not getting what you're trying to do. Your code above (if it worked) would have replaced the tag with the word 'right' if all four TVs contained the content of their respective chunks and I doubt if that's what you wanted.

            Are you using getResources to create the teasers? It has a number of &tp* properties that might work for you. http://rtfm.modx.com/display/ADDON/getResources#getResources-TemplatingProperties


            ---------------------------------------------------------------------------------------------------------------
            PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
            MODX info for everyone: http://bobsguides.com/modx.html
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting