ez.no / exponential / documentation / reference / data fetching / content / version
fetch( 'content', 'version', hash( 'object_id', object_id,
'version_id', version ) )
| Name | Type | Description | Required |
|---|---|---|---|
| object_id | integer | ID of object to fetch version from. | Yes. |
| version_id | integer | The version number to fetch. | Yes. |
ezcontentobjectversion
This fetch function gets a specific version of an object. The ID of the object and the number of the version to be fetched must be specified. The function returns an ezcontentobjectversion object.
{* Fetch version 1 of object number 14. *} {let version=fetch( 'content', 'version', hash( 'object_id', 14, 'version_id', 1 ) )} {* Print the name of the version that was fetched. *} Name of this version: {$version.name} {/let}
This will simply fetch version 1 of object 14 and print the name of that version.
Comments