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