version
Summary
Fetches a specific version of an object.Usage
fetch( 'content', 'version', hash( 'object_id', object_id, 'version_id', version_id ) )
Parameters
Name | Type | Description | Required |
---|---|---|---|
object_id | integer | The ID number of the target object. | Yes. |
version_id | integer | The version number that should be fetched. | Yes. |
Returns
An ezcontentobjectversion object or FALSE.
Description
This function fetches a specific version of a content object. Both the ID number of the target object and the number of the desired version must be specified using the "object_id" and the "version_id" parameters. The function returns an ezcontentobjectversion object. It will return FALSE if invalid parameters have been provided or if the current user has insufficient permissions.
Examples
Example 1
{def $version=fetch( 'content', 'version', hash( 'object_id', 13, 'version_id', 3 ) )} Name of version: {$version.name}
Outputs the name of version number 3 for object number 13.
Balazs Halasy (06/02/2004 12:15 pm)
Balazs Halasy (29/04/2005 9:03 am)
Comments
There are no comments.