Forums / General / Count nodes

Count nodes

Author Message

Arash Molavi

Wednesday 19 November 2003 9:01:08 am

How do i count and print out nodes that are in a folder?

Marco Zinn

Wednesday 19 November 2003 12:09:14 pm

You can use this template snippet to count all children of Class 2 (this usually is "article") in the current node.

{let articles_count=fetch('content','list_count',
hash(parent_node_id,$node.node_id,
class_filter_type,"include",
class_filter_array,array(2)))}

This Node has {$article_count} articles.

Also see here: http://ez.no/developer/ez_publish_3/documentation/customization/tips_tricks/one_article_folder
and here
http://ez.no/developer/ez_publish_3/documentation/development/libraries/ez_template/operators/data_fetch

Marco
http://www.hyperroad-design.com

Arash Molavi

Thursday 20 November 2003 1:08:23 pm

Saw that minutes after I posted this topic. But when caching the override file it only prints out "Array"