Function Reference / append_results

Append additional results to the current result set. This is useful when using a static layout containing a set number of elements and you need to ensue that each cell is populated.

OVERVIEW

PHPzestoi_append_results(string $type, array $args)
PHPzestoi_append_results(string $type, string $args)
SMARTY{append_results module=MODULE arg1=VAL1 arg2=VAL2}

EXAMPLES

PHP

Either an array of args or a string can be passed in:

// append some extra webcams results to whatever has already been extracted
zestoi_append_results("webcams", "status=!offline&gender=female&max=30");

// this also works - by passing in an array instead of a string
zestoi_append_results("webcams", array("status" => "!offline", "gender" => "female", "max" => 30));

SMARTY

{* append some webcams results *}
{append_results module=webcams status=!offline gender=female max=30}

STATIC LAYOUT EXAMPLE

Your can either use Smarty for a static layout or the custom <i>TGP</i> format that was introduced before Smarty could be used in this way.

Smarty Example

<img src="{$webcams_results.0.photo}"> {$webcams_results.0.name} <br>
<img src="{$webcams_results.1.photo}"> {$webcams_results.1.name} <br>
<img src="{$webcams_results.2.photo}"> {$webcams_results.2.name} <br>
<img src="{$webcams_results.3.photo}"> {$webcams_results.3.name} <br>

TGP Example

<img src="#photo:1:webcams#"> #name:1:webcams# <br>
<img src="#photo:2:webcams#"> #name:2:webcams# <br>
<img src="#photo:3:webcams#"> #name:3:webcams# <br>
<img src="#photo:4:webcams#"> #name:4:webcams# <br>