This is the old documentation center for eZ Publish 4. We are currently migrating the eZ Publish documentation to http://confluence.ez.no the eZ Publish 5 documentation platform. Documentation for the eZ Publish legacy components are still located on this site, as well as all documentation for earlier releases.

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 1:51 pm)

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


Comments

There are no comments.