You get a bonus - 1 coin for daily activity. Now you have 1 coin

How to get a resource count (getResources) in MODX before its output

Practice



Heading that needs to be hidden if there are no resources:

[[!getResources? &showHidden=`1` &limit=`204` &tpl=`main.ProblemsRowTpl` &includeContent=`1` &includeTVs=`1` &processTVs=`1` &parents=`3` &depth=`1` &tvFilters=`ff==[[*id]]` ]]>

You could try using the total variable [[+total]] and then the resource output itself

[[!getResources?&showHidden=`1` &limit=`24` &tpl=`` &includeContent=`1` &includeTVs=`1` &processTVs=`1` &parents=`3` &depth=`1` &tvFilters=`ffff==[[*id]]` ]]
[[!If? &subject=`[[+total]]` &operator=`>` &operand=`0` &then=`

Заголовок:`]]

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Running server side scripts using PHP as an example (LAMP)"

Terms: Running server side scripts using PHP as an example (LAMP)