Caution: This documentation is for eZ Publish legacy, from version 3.x to 6.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

list

Summary

Fetches the URLs that are stored in the URL table.

Usage

fetch( 'url', 'list', hash( [ 'is_valid', is_valid, ]
                            [ 'offset',   offset,   ]
                            [ 'limit',    limit     ] ) )

Parameters

NameTypeDescriptionRequired
is_valid boolean Instructs the system to only fetch valid or invalid URLs. No.
offset integer The offset to start at. No.
limit integer The number of URLs that should be fetched. No.

Returns

An array of ezurl objects or FALSE.

Description

This function fetches URLs from the URL table.The URL table stores addresses that have been input using the URL or the XML block datatype. Please refer to the "URL storage" section of the "Concepts and basics" chapter for more information about how the system handles URLs.

The "is_valid", "offset" and "limit" parameters are optional. While the "is_valid" parameter can be used to filter out only valid (TRUE) or invalid (FALSE) URLs, the "offset" and "limit" parameters can narrow down the result. If the "is_valid" parameter is omitted, both valid and invalid URLs will be fetched. The function returns an array of ezurl objects. If no URLs can be found, the function will return FALSE.

Examples

Example 1

{def $urls=fetch( 'url', 'list', hash( 'is_valid', true(),
                                       'offset',   0,
                                       'limit',    10 ) )}
 
{foreach $urls as $url}
    {$url.url} <br />
{/foreach}

Outputs the first ten valid URLs that are stored in the URL table.

Balazs Halasy (06/02/2004 12:49 pm)

Balazs Halasy (29/04/2005 9:25 am)


Comments

There are no comments.