Forums / Developer / Fetch comparing elements of the class.

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

Fetch comparing elements of the class.

Author Message

Jorge estévez

Sunday 26 December 2004 4:44:40 am

Hello!

In the following code I would like to do a fetch but only those elements of the class whos attribute 227 is equal to a string ($node.name), the problem is that attribute 227 of the class is a Drop Down List, and the documentation says:

<i>
Attribute filtering
The attribute filter mechanism is controlled by the "attribute_filter" parameter. Attribute filtering makes it possible to fetch a set of nodes where an attribute (or several attributes) contains some specific data. Attribute filtering is supported by the following datatypes:

ezboolean
ezdate
ezdatetime
ezemail
ezinteger
ezselection (will not work when used as multiple selector)
ezstring
eztime
</i>

The code:


fetch_alias( children_count, hash( parent_node_id, 324 ,
					 							class_filter_type,"include", 
												class_filter_array, array(33),
												depth, 15, attribute_filter, array(array( 277, '=', $node.name)),
												sort_by,array( attribute,false(),256 )
												) )}

My code works fine when the attribute to be compared is a string or else, but theres no way to make it run properly with the drop down list. <b>Is there any workaround?</b>, I am using ez version 3.4.1

Thanks!

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com