Function Reference / append_resultsAppend 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
EXAMPLESPHPEither 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 EXAMPLEYour 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> |
