We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24731 ☆ A M B ☆
    • 211 Posts
    Quote from: rthrash at Apr 22, 2007, 10:54 PM

    There’s actually been a discussion of changing the parameter name to &filterOut. It can indeed be confusing.

    Indeed, it took me some time before I finally figure it out :S, so it wouldn’t be a bad idea.

    Regards,
    Jose R. Lopez
      • 18397
      • 3,250 Posts
      The problem with your initial filter call was with this section:
      , 'dr',
      


      Ditto will take everything between the delimiters as what you want to filter by. Thus, it saw the space and quotes as part of the text.

      In your second filter call you removed the spaces and quotes, thus it worked.

      Regarding how filtering works (and I need to fix this in the documentation):
      "Filtering REMOVES all items that make the filter statement true. Thus if joe is != foo it will be removed if it was mode 1. However, by setting mode 2 Ditto would only show the items removed."
        • 24731 ☆ A M B ☆
        • 211 Posts
        Thanks a lot for clearing that up Mark. It will be great if you could update the documentation. I was using the quotes and the space following up on the first sample call I had seen here:

        http://wiki.modxcms.com/index.php/Ditto_Parameters

        To only show docs where Template Variable ’shapes’ equals ’square’: &filter=`tvshapes, ’square’, 2`

        To only show docs where Template Variable ’shapes’ contains ’square’: &filter=`tvshapes, ’square’, 7`

        I then noticed the version difference and started to look up more info for this latest version but never thought the syntax would have really changed.

        Thanks anyways for your prompt assistance.

        Regards,
        Jose R. Lopez
          • 18397
          • 3,250 Posts
          The syntax in the wiki is incorrect. No version of Ditto (or even NewsListing for that matter) uses that syntax. Remember, the wiki is not official...
            • 24731 ☆ A M B ☆
            • 211 Posts
            I understand Mark, thank you.