Quote from: cristianb88 at Jul 08, 2014, 10:21 AMQuote from: mopmodx at Jan 22, 2013, 09:46 AMQuote from: Bruno17 at Oct 26, 2012, 08:54 AMyou could also make sure to have '||' at front and at end of the list in your TV
||25||26||30||40||
then you could use
&tvFilters=`list.top10.categories==%||[[*id]]||%`
Hi all,
i have a TV type superBoxselect (think it's the same as using the multi-select) to delimit the beginning and the end of the list i created a Custom Output that returns ||6||7||8||9|| or ,6,7,8,9, depending on the chosen delimiter.
but in the database is stored only in this way 6||7||8||9
don't save the processed data with the Output option!
So &tvFilters=`myTV==%||6||%` fails!
i would not use a TV-type text and manually enter a list of IDs
could find another solution?
Anyone resoved the problem ? My problem there is related product in modx, but don't found the solution.
I ran into a similar problem and found a (brute) workaround for filtering IDs reliably. The following code couldn't distinguish between an ID of "20" and an ID of "203" (remember the wildcards in "%[[*id]]%" are needed for lists of IDs!):
&tvFilters=`[[*relatedassetsTemplatevariableTV]]==%[[*id]]%`
So I came up with this:
&tvFilters=`[[*relatedassetsTemplatevariableTV]]==%[[*id]]%,[[*relatedassetsTemplatevariableTV]]!=%0[[*id]]%,[[*relatedassetsTemplatevariableTV]]!=%1[[*id]]%,[[*relatedassetsTemplatevariableTV]]!=%2[[*id]]%,[[*relatedassetsTemplatevariableTV]]!=%3[[*id]]%,[[*relatedassetsTemplatevariableTV]]!=%4[[*id]]%,[[*relatedassetsTemplatevariableTV]]!=%5[[*id]]%,[[*relatedassetsTemplatevariableTV]]!=%6[[*id]]%,[[*relatedassetsTemplatevariableTV]]!=%7[[*id]]%,[[*relatedassetsTemplatevariableTV]]!=%8[[*id]]%,[[*relatedassetsTemplatevariableTV]]!=%9[[*id]]%,[[*relatedassetsTemplatevariableTV]]!=%[[*id]]0%,[[*relatedassetsTemplatevariableTV]]!=%[[*id]]1%,[[*relatedassetsTemplatevariableTV]]!=%[[*id]]2%,[[*relatedassetsTemplatevariableTV]]!=%[[*id]]3%,[[*relatedassetsTemplatevariableTV]]!=%[[*id]]4%,[[*relatedassetsTemplatevariableTV]]!=%[[*id]]5%,[[*relatedassetsTemplatevariableTV]]!=%[[*id]]6%,[[*relatedassetsTemplatevariableTV]]!=%[[*id]]7%,[[*relatedassetsTemplatevariableTV]]!=%[[*id]]8%,[[*relatedassetsTemplatevariableTV]]!=%[[*id]]9%`
In my example [[*relatedassetsTemplatevariableTV]] holds the TV to compare with (depending on the page where it is called by [[getResources]]), which is either a TV that holds one ID or a list of IDs, delimited with ",".
See it working live:
http://www.sounddirect.at/sheila-fernandez-fooled-again-single/.
[ed. note: gernot_ebenlechner last edited this post 9 years, 11 months ago.]