We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34244
    • 51 Posts
    I have a Listbox (multiple select) with the input options as:

    All||Direct Mail||Website||Email||Document||Event||Social Media||Promo Item

    And I have the output type set as "Delimiter" with a comma as the value.

    Yet when my TV is output I'm getting "Direct Mail||Promo Item" (the correct selects, just not the correct delimiter).

    I've tried re-saving the resource, deleting the cache, resaving the TV (double checking "delimiter" is selected as the output type).

    Any ideas?

    Thanks!
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      I tried it, and it works as expected. What type is the TV? I tried it with a checkbox.

      Saw that you're using a multi-select listbox. That also works as expected for me.

        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 34244
        • 51 Posts
        sottwell, thanks for responding. I seem to have it set up the same way, but I'm still getting double pipes "II" instead of a comma delimiter. Correct returned values, however, just the delimiter is wrong. I'm using it with getResources and a chunk tpl.
          • 34244
          • 51 Posts
          Eventually, I worked around the issue by outputting my TV with an output filter like so:

          [[+tv.tool-type:replace=`||==, `]]

          But using an output filter doesn't seem efficient and I worry that something is wrong with my setup.
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            I would say that there's something wrong. What version of MODX are you using?
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Did you remember to use the &processTVs property to tell getResources to use the output widgets?
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 34244
                • 51 Posts
                Latest release: 2.2.14.

                Susan, No, as a matter of fact, I'm not using &processTVs, but when I include it thusly:

                [[!getResources? &parent=`[[*id]]` &tpl=`toolTpl` &limit=`5` &depth=`0` &includeTVs=`1` &processTVs=`1`]]

                All hell breaks loose (displaying HTML code in various places) where it was displaying fine before. Hm.

                But I think we're on to something!
                  • 34244
                  • 51 Posts
                  Susan, thank you so much for pointing out the &processTVs. It's all working now!

                  The "hell breaking loose" part was a TV that I had defined for Image output but the tpl was set to only take in the path, so when I added &processTVs=`1` it initially broke everything. After I redefined that TV for text output, all was well again.

                  I should have a getResources crib sheet hanging at my desk it has bit me so many times!

                  Again, thanks.

                  Matt