Friday, December 10, 2010

Modx 2 getResources enhanced tvFilters

I've done some modification to getResources to accomodate more condition operators such as :
!=
EXISTS
NOTEXISTS
| : for OR operator

And changed that the condition will only effect after the main condition is meet, etc. published='1' and deleted='0'

Examples:
tvFilters=`mytv!=%xxx%|mytv==NOTEXISTS`
#setting condition to TV mytv does not contain tag "xxx" or no mytv variable exists

getResources2.php

Hope it helps you guys :)
Cheers~

No comments: