Skip to the content
Documentation

version_count

No ratings yet

Summary

Fetches the number of versions of a content object.

Usage

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

Parameters

Name Type Description Required
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.

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.