MIGX - getImageList - count number of results

Hi all,

I have a simple getImageList call:

[[!getImageList?
	&tvname=`jobs`
	&tpl=`jobs-content-tpl`
	&where=`{"jobEnable:=":"yes"}`
]]

How can I count the number of results and, for example:

if 0 results,do x
else, do y

I know there’s a [[+total]] placeholder but that’s only available in the tpl when there are more than 0 results.

I also know I can evaluate the contents of the jobs TV itself and ascertain if it’s empty or otherwise - but the &where clause rules this out because if jobs do exist but are all disabled, the TV would return as not empty.

An empty results TPL would suffice but can’t see any mention of anything like this.

No doubt I’m missing something simple here as usual!

Many thanks in advance for any thoughts.

does

&emptyTpl=`@CODE:there are no results` 

do what you need?

It does indeed, @bruno17

Thank you so much!

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.