Forums / Setup & design / Bug in limiting results from fetching tree?

"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".

Bug in limiting results from fetching tree?

Author Message

Kjell Inge Sandvik

Thursday 08 September 2005 5:30:48 am

Hello

I have a code like this:

{def $bilder=fetch(content,tree,hash(parent_node_id,77, class_filter_type,include,class_filter_array,array('picture')),
limit,6, sort_by,array('published',false()))}

to loop through a content tree of pictures. The fetch should only get the 6 most recent additions, but instead it returns all! Is this a bug?

BTW: node-id 77 is the topnode of the tree.

Sandvik Web & Data

Kristof Coomans

Thursday 08 September 2005 6:05:07 am

I think there's a mistake in your template code. You've closed the hash with the parameters after array('picture'), but limit and sort_by should be keys inside the hash.

This is the right code:

{def $bilder=fetch(content,tree,hash(parent_node_id,77, class_filter_type,include,class_filter_array,array('picture'),
limit,6, sort_by,array('published',false())))}

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Kjell Inge Sandvik

Thursday 08 September 2005 6:29:42 am

Ah of course! Thank you! My eyes did not notice that one :-)

Sandvik Web & Data