Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

version_count

Summary

Fetches the number of versions of a content object.

Usage

fetch( 'content', 'version_count', hash( 'contentobject', object ) )

Parameters

NameTypeDescriptionRequired
contentobject object The target object. Yes.

Returns

The number of versions of an object (as an integer).

Description

This function retrieves the number of versions of a content object. The target object must be specified using the "contentobject" parameter.

Examples

Example 1

{* Fetch object number 13. *}
{def $object=fetch( 'content', 'object', hash( 'object_id', 13 ) )}
 
{* Fetch the number of versions for object number 13. *}
{def $versions=fetch( 'content', 'version_count', hash( 'contentobject', $object ) )}
 
Object number 13 consists of {$versions} versions.
 

Outputs the numbre of versions that make up object number 13.

Balazs Halasy (06/02/2004 12:16 pm)

Balazs Halasy (29/04/2005 9:03 am)


Comments

There are no comments.