Skip to the content
Documentation

tipafriend_top_list

No ratings yet

Summary

Fetches the most popular (most tipped) nodes.

Usage

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

Parameters

Name Type Description Required
offset integer The offset to start at. No.
limit integer The number of nodes that should be returned. No.

Returns

An array of ezcontentobjecttreenode objects or FALSE.

Description

This function fetches the nodes that were most tipped using the "Tip a friend" feature (for example "/content/tipafriend/44). The optional parameters "offset" and "limit" can be used to limit the result. The function returns an array of ezcontentobjecttreenode objects. If no nodes are found or if an error occurs, the function will return FALSE.

Examples

Example 1

{def $popular_nodes=fetch( 'content', 'tipafriend_top_list',  hash( 'limit',  10 ) )}

{foreach $popular_nodes as $popular_node}
    {$popular_node.name|wash} <br />
{/foreach}

Outputs the names of the ten most tipped nodes.

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.