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

list_count

Summary

Fetches the number of URLs that are stored in the URL table.

Usage

fetch( 'url', 'list_count', hash( [ 'is_valid', is_valid ] ) )

Parameters

NameTypeDescriptionRequired
is_valid boolean Instructs the system to count either valid or invalid URLs. No.

Returns

The number of URLs (as an integer).

Description

This function fetches and counts the URLs that are stored in 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" parameter is optional and can be used to filter out only valid (TRUE) or invalid (FALSE) URLs. If the "is_valid" parameter is omitted, both valid and invalid URLs will be counted. The function returns the number of found URLs as an integer.

Examples

Example 1

{def $valid_urls=fetch( 'url', 'list_count', hash( 'is_valid', true() ) )
Number of valid URLs: {$valid_urls}

Outputs the number of valid URLs.

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

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


Comments

There are no comments.