there is a tv - a single list Да==1||Нет==0 How to display a random resource with a тв== да sign тв== да

I do it but nothing comes out

  [[getResources? &parents=`2` &tpl=`leftadsk` &limit=`1` &depth=`10` &includeContent=`1` &includeTVs=`1` &processTVs=`1` &tvPrefix=`` &sortby=`createdon` &sortdir=`DESC` &where=`{"check1=":1}` ]] 

I have 4 such blocks and I need to display 4 different resources for the above condition

    1 answer 1

    For filtering by tv in getResources, you can use the &tvFilters= parameter. If all other conditions you have are correct, then the call should become something like this:

     [[!getResources? &parents=`2` &tpl=`leftadsk` &limit=`1` &depth=`10` &includeContent=`1` &includeTVs=`1` &processTVs=`1` &tvPrefix=`` &sortby=`createdon` &sortdir=`DESC` &tvFilters=`check1==1` ]] 

    I would also recommend that you use pdoResources instead of getResources . They have no significant differences in the call and parameters, however pdoResources much more productive.

    • Thanks, but how to display a random entry and then again randomly output a resource so that they do not repeat? - Aslero