We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10226
    • 412 Posts
    I need to filter documents by a TV. I think my biggest problem is that the TV contains spaces sad I have done something similar to this, but I do not recall the workaround! The TV is a single-select drop-down if that helps.

    &filter=`tvspecies,'Ball Python',2`


    Looking at the debug output, it is getting the data, but the filtering is just not happening. I get either all or no documents depending on the clause.

    Thanks
      • 7231
      • 4,205 Posts
      is tvspecies the actual name of the TV? I think that for reverse compatibility Ditto will remove the tv from the name (in the old ditto you needed to identify a tv with the tv prefix, no longer needed).

      Not sure if the space would be an issue, I seem to remember filtering by title (with spaces) and not having any problems. Need to give this a test to confirm though.
        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don't know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 10226
        • 412 Posts
        There is a TV named species - but it works with tvspecies, as well as species, but I had to change the species to all lcase with no spaces. This is when things started working. On another project I recall using ’short-names’ and a snippet of some sort for this matter. This time around it is for personal use so I can remember a few of my own acronyms.

        For some reason the Ditto 2 docs seriously lack the &filter stuff - but it looks like it has not changed since v1.x