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!
-
☆ 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.
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.
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.
-
☆ A M B ☆
- 24,524 Posts
I would say that there's something wrong. What version of MODX are you using?
-
☆ A M B ☆
- 24,524 Posts
Did you remember to use the &processTVs property to tell getResources to use the output widgets?
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!
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