Setting up a count

Error message

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'comment_node_forum_form' not found or invalid function name in drupal_retrieve_form() (line 844 of /var/www/www.gremwell.com/includes/form.inc).

Submitted by thehybridtech on 19 March, 2012 - 00:54

Working on designing a report that in the beginning publishes a count of hosts, services. What is the best way to accomplish a count? Thank you in advance!

{{.[count(ipproto/port)=0]|hidden}} acts as condition to display or not to display the rest of the paragraph. If there are no ipproto/port nodes, the count is zero and the paragraph is displayed. Othewise it isn't. "|hidden" is a flag meaning that the expression is executed, but the result is not displayed. It is usefull for changing the scope (what the subsequent expressions will consider the current node in the tree) and for conditional display as in the example above.