pagination sample

This commit is contained in:
Etienne Roudeix
2013-07-08 11:52:10 +02:00
parent 0b9d7d1d35
commit 4bd971e625
2 changed files with 60 additions and 1 deletions

View File

@@ -220,7 +220,11 @@ class TheliaLoop implements SmartyPluginInterface
// Find pagination
$pagination = self::getPagination($loopName);
if ($pagination === null) {
throw new \InvalidArgumentException("Loop $loopName : no pagination found.");
throw new \InvalidArgumentException("Loop $loopName is not defined");
}
if($pagination->getNbResults() == 0) {
return '';
}
if ($content === null) {