counting with "tree_count" not working

Author Message

Alexandre Cunha

Tuesday 16 May 2006 9:53:26 am

Hello,

I have problems using 'tree_count':

{def $max=fetch('content', 'tree_count', hash( parent_node_id, 170),
      class_filter_type, "exclude",

      class_filter_array, array( 'gallery' ),
      class_filter_type, "include",

      class_filter_array, array( 'image' )  )
}

$max returns the counting off all itens inside parent_node_id 170 and ignores all filters.

What is wrong ?

http://AlexandreCunha.com

Kristof Coomans

Tuesday 16 May 2006 11:29:01 am

Hi Alexandre

Put your filters inside the hash like you did with parent_node_id. That will work better ;)

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

Alexandre Cunha

Wednesday 17 May 2006 5:24:19 am

Thanks Kristof, you are right !

For future reference, the correct template code now is:

 

{def $max_fotos=fetch('content', 'tree_count', hash( parent_node_id, 170,
     class_filter_type, "include",     class_filter_array, array( 'image' )   )   )
}
 

http://AlexandreCunha.com

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.