Small extend in smarty to limit foreach.
On file : sysplugins/smarty_internal_compile_foreach.php
Add limit to original attributes :
public $optional_attributes = array('name', 'key','limit');
Add after $output = " this >
if (isset($_attr['limit'])) {
$limit = $_attr['limit'];
$output .= "\n \$_limitCnt = 0; \n \$_limit = $limit; \n";
}
Add before $output .= "?>";
this >
if (isset($_attr['limit'])) {
$output .= "\n if (\$_limitCnt == \$_limit) { break; }";
$output .= "\n \$_limitCnt++;";
}
Use as usuall for each and add limit=# to limit your results.
Hope i helped.