collected_info_count
Summary
Fetches the number of collections that match a certain criteria.Usage
fetch( 'content', 'collected_info_count', hash( [ 'object_attribute_id', object_attribute_id, ] [ 'object_id', object_id, ] [ 'value', value ] ) )
Parameters
Name | Type | Description | Required |
---|---|---|---|
object_attribute_id | integer | The ID number of the target object attribute. | No. |
object_id | integer | The ID number of the target content object. | No. |
value | integer | Value filtering on the attribute level. | No. |
Returns
The number of collections (as an integer).
Description
This function counts the number of collections based on the provided parameters. An object's ID number (using the "object_id" parameter) or an object attribute's ID number (using the "object_attribute_id" parameter) must be specified. In addition, it is possible to filter out collections that match a certain value. This is typically useful when it comes to counting the number of times a specific value was submitted to a poll. If the "value" parameter is used then the "object_attribute_id" parameter must also be provided. The function returns a positive integer if the system is able to find collections matching the given parameters; if not, zero will be returned.
Examples
Example 1
{def $collections=fetch( 'content', 'collected_info_count', hash( 'object_attribute_id', 42, 'object_id', 20, 'value', 1 ) )} {$collections}
Outputs the number of times attribute #42 for object number 20 has collected "1".
Balazs Halasy (06/02/2004 12:05 pm)
Balazs Halasy (29/04/2005 8:26 am)
Comments
What is it mean? Thank you
Wednesday 09 July 2008 7:35:20 am
cindy
$left_menu_items = fetch( 'content', 'list', hash( 'parent_node_id', $root_node.node_id,
'sort_by', $root_node.sort_array,
'class_filter_type', 'include',
'class_filter_array', ezini( 'MenuContentSettings', 'LeftIdentifierList', 'menu.ini' ) ) )
Re: What is it mean? Thank you
Wednesday 09 July 2008 7:53:30 am
Svitlana Shatokhina
http://ez.no/doc/ez_publish/techn...modules/content/fetch_functions/node
http://ez.no/doc/ez_publish/techn...modules/content/fetch_functions/list
Next time, please ask such questions at http://ez.no/developer/forum
Thank you!