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.

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