[[+content_image]]
D
D
Denis Minimal2019-11-04 15:55:27
MODX
Denis Minimal, 2019-11-04 15:55:27

How to correctly form WHERE in MODX?

I make the output of resources containing a certain id in the service field in this way:

[[!getImageList?
    &tvname=`migx_testimonials`
    &tpl=`migx_testimonial_tpl`
    &limit=`5`
    &docid=`1`
    &where=`{"service:=": 2}`
]]

If the service field contains only one id, then everything works fine. The service field can also contain several comma-separated id's. In that case, &where=`{"service:=": 2}`it doesn't work.
How to correctly form a where condition so that resources are displayed in both cases?

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
V
Viktor Yanyshev, 2019-11-04
@villiwalla

Instead of = write in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question