I
I
IbraimVeli2019-07-13 14:51:48
MODX
IbraimVeli, 2019-07-13 14:51:48

Pdoresources sort host resources by tv filter?

Hello.
In PDO resource, when displaying resources, I want only those resources that have a specific value specified in the parent's TV to be displayed. I'm trying like this, but it doesn't work. How to proceed?
Tell me plz.

&element=`msProducts`
    &tpl=`productMenuGrid`
    &limit=`1000`
    &depth=`2`
    &hideContainers=`0`
    
      &where=`{"parent":"tvFilter==":1}`

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Tarasov, 2019-07-13
@an-tar

You call msProducts through pdoResources and pass it a condition so that the parent of the product is equal to what ?? you didn’t make a mistake with the syntax of the json array that should be passed?
Offhand, the query should be more complex, you must first select the parents from their TV, and only then select the ones you need from them.
See building complex queries for this snippet.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question