eZ Community » Forums » Setup & design » Bug in limiting results from fetching...
expandshrink

Bug in limiting results from fetching tree?

Bug in limiting results from fetching tree?

Thursday 08 September 2005 2:30:48 pm - 2 replies

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.

Modified on Thursday 08 September 2005 2:38:26 pm by Kjell Inge Sandvik

Thursday 08 September 2005 3:05:07 pm

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())))}

Thursday 08 September 2005 3:29:42 pm

Ah of course! Thank you! My eyes did not notice that one happy.gif Emoticon

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from