Forums / Setup & design / Attribute filter with files
Olav Frengstad
Monday 21 February 2011 1:19:19 am
Hey,
Im trying to fetch the latest node that HAS a file attached to it but can't seem to make it work:
{def $item = fetch('content', 'tree', hash( 'parent_node_id', 60, 'limit', 1, 'class_filter_type', 'include', 'class_filter_array', array( 'news' ), 'attribute_filter', array('and', array( 'news/podcasturl', '!=', null()) ) ) )}
Iv tried to look through SQL debug and it doesnt even look like the query is performed :/Why don't the null() operator work? i tried false, and '' also with no luck...
André R.
Monday 21 February 2011 1:43:40 am
You have a better chanche trying testing against empty string, 1. that is usually what's in the db 2. null() in the tempalte language is just a check for null, aka does the same thing as is_null()
eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription @: http://twitter.com/andrerom