From 7f0dd5c13b5677fe26333000304fa2f9fe5f94a5 Mon Sep 17 00:00:00 2001 From: Etienne Roudeix Date: Fri, 5 Jul 2013 17:15:22 +0200 Subject: [PATCH] product loop --- .../Core/Template/Smarty/Plugins/TheliaLoop.php | 10 +++++----- templates/smarty-sample/index.html | 14 +++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/core/lib/Thelia/Core/Template/Smarty/Plugins/TheliaLoop.php b/core/lib/Thelia/Core/Template/Smarty/Plugins/TheliaLoop.php index 18ae783f0..86a29da6d 100755 --- a/core/lib/Thelia/Core/Template/Smarty/Plugins/TheliaLoop.php +++ b/core/lib/Thelia/Core/Template/Smarty/Plugins/TheliaLoop.php @@ -130,13 +130,13 @@ class TheliaLoop implements SmartyPluginInterface $template->assign($var, $val); } - // Assign meta information - $template->assign('LOOP_COUNT', 1 + $loopResults->key()); - $template->assign('LOOP_TOTAL', $loopResults->getCount()); - - $repeat = true; + $repeat = true; } + // Assign meta information + $template->assign('LOOP_COUNT', 1 + $loopResults->key()); + $template->assign('LOOP_TOTAL', $loopResults->getCount()); + // Loop is terminated. Cleanup. if (! $repeat) { // Restore previous variables values before terminating diff --git a/templates/smarty-sample/index.html b/templates/smarty-sample/index.html index 5a73519b0..c185ae5f8 100755 --- a/templates/smarty-sample/index.html +++ b/templates/smarty-sample/index.html @@ -17,7 +17,7 @@ An image from asset directory :

Category loop example