J
J
Jazz75RUS2016-06-30 08:43:52
MODX
Jazz75RUS, 2016-06-30 08:43:52

Modx REVO How to display documents whose tv value is the same as the current one?

Using pdoResources I try to display similar documents, I need to show documents in which the tv "compar" has the same value as the current one, I get the field value of the current document through FastField (GetResourceField did not work at all) using the &tvFilters=`compar==`
The problem is that if the field is empty or there are no similar documents, the page crashes, the console is empty, some TV fields are not displayed, although everything is OK in the output template, and without the tvFilters parameter, everything is output normally , can you tell me another way to get the value of tv, it seems like you can use the api of the modx itself ..

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2016-06-30
@Jazz75RUS

enjoy)

&includeTVs=`compar`
&where=`{"compar":""}`

If compar is empty, nothing will be output.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question