Skip to the content
Documentation

draft_version_list

No ratings yet

Summary

Fetches the drafts that belong to the current user.

Usage

fetch( 'content', 'draft_version_list',
       hash( [ 'offset', offset, ]
             [ 'limit',  limit   ] ) )

Parameters

Name Type Description Required
offset integer The offset to start at. No.
limit integer The number of drafts/versions that should be fetched. No.

Returns

An array of ezcontentobjectversion objects or FALSE.

Description

This function fetches the drafts that belong to the current user. The optional parameters "offset" and "limit" can be used to limit the result. The function returns an array of ezcontentobjectversion objects. If no drafts can be found or if something goes wrong, the function returns FALSE.

Examples

Example 1

{def $drafts=fetch( 'content', 'draft_version_list' )}

{foreach $drafts as $draft}
    {$draft.id}: {$draft.name} <br />
{/foreach}

Outputs the ID numbers and the names of all drafts that belong to the current user.

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.