Function Reference / zestoi

This function selects data for display, optionally pre-rendering the entire result set and each individual result.

OVERVIEW

PHPstring zestoi(string $type, array $args)
PHPstring zestoi(string $type, string $args)

EXAMPLES

if you have a template called zestoi/templates/grid.tpl that uses smarty format to display a model's photo and name etc you can display a grid of models using the following code:

zestoi('webcams', 'template=grid.tpl');

This will use the default number of rows and columns you have specifid via the admin pages. The following example will display a 10x5 grid of online female (or female/female) models:

zestoi('webcams', 'rows=10&cols=5&status=!offline&gender=female|female/female&template=grid.tpl');

The first argument to zestoi() is the type of data to be displayed (webcams, article, feed) and the second is the query specifying the data to be displayed. It resembles a normal web page query, with each item in the query separated by a '&' character and the key/values separated by an equal sign '='.

The formats possible for the individual values are:

a single item name=john
one of multiple items name=john|suzie|anna
not an item name=!john
not in the list name=!john|suzie|anna
the number is less than age=..30
the number is greater than age=30..
the number is between (or equal to) age=18..30

After calling zestoi the following values are available via val or vals:

matches

the number of successfull matches

page_matches

number of matches in the current page

page

current paginated page offset

per_page

the number of items on each page (max)

SMARTY

There is no single function for use in Smarty. Instead you use one of these functions for the type of data you require: