Forums / Developer / Fetching object of a given class

Fetching object of a given class

Author Message

Nicolas R

Friday 13 February 2009 5:03:04 am

Hello,

I try to get a list of object of a given class but the returned array always contains all objects, not only the objects of the given class.
My fetch is:

fetch( 'content', 'list', array( 'class_filter_type' => 'MyClass', 'parent_node_id' => 629 ) );

Where am I wrong ?
Thank you !

Ivo Lukac

Friday 13 February 2009 5:17:39 am

Try it like this:

fetch( 'content', 'list', hash( 'parent_node_id', 629, 'class_filter_type', 'include', 'class_filter_array', array('MyClass') ) )

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Nicolas R

Friday 13 February 2009 5:31:58 am

It works. I misread the documentation about include/exclude !
Thank you very much !