We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10165
    • 129 Posts
    I need to filter lots of tv values (delimited) but some are tags (which modx saves in the db as comma delimited) and some are checkboxes or selects (which modx saves with || delimiters). I have a brilliant little snippet which Bruno kindly helped me with that filters all the || delimited tv’s and works great so if I could force the other tags to save this way too it would be perfect. I expect it will be a case of writing a snippet to convert the commas each time I call them, but it would obviously be better to have them saved in the right format in the db and avoid extra processing? This would probably break the manager tagging widget then I guess though.

    Any thoughts .. cheers
      • 4172
      • 5,888 Posts
      I have another solution for you:

      http://modxcms.com/forums/index.php/topic,49806.msg290495.html#msg290495

      you can now define in searchdocs-snippetcall as parameter, if you have comma or pipe-delimeted-tv pipes-delimeted is default.
      if you have comma-delimeted use tvname:comma

      [[searchdocs &parents=`100,200`&depth=`2`&tvnames=`gender,brand,tagtv:comma`]]


      Note: you have to use allways &tvnames= now in your snippet-call.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 4172
        • 5,888 Posts
        I think you can set the delimiter with:
        mm_widget_tags('blogTags','||'); 
        if you want so.
          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!