This seems to work
[[!getResources? &parents=`118` &tpl=`TPL` &includeTVs=`1` &limit=`1` &sortby=`RAND()` &tvFilters=`LeaderboardImg==%`]]
note the % in the tvFilters param
Hi,
Can anyone help with filtering empty TVs with getResources?
So far I tried
[[!getResources? &parents=`118` &tpl=`TPL` &includeTVs=`1` &limit=`1` &sortby=`RAND()` &tvFilters=`LeaderboardImg==''`]]
[[!getResources? &parents=`118` &tpl=`TPL` &includeTVs=`1` &limit=`1` &sortby=`RAND()` &tvFilters=`LeaderboardImg==`]]
Looking at the code it might not be possible
$conditions[$filterGroup][] = "EXISTS (SELECT 1 FROM {$tmplVarResourceTbl} `tvr` JOIN {$tmplVarTbl} `tv` ON `tvr`.`value` LIKE {$tvValue} AND `tv`.`name` = {$tvName} AND `tv`.`id` = `tvr`.`tmplvarid` WHERE `tvr`.`contentid` = `modResource`.`id`)";
I’m trying to display a random image TV.
Thank you.