diff --git a/core/lib/Thelia/Admin/Controller/BaseAdminController.php b/core/lib/Thelia/Admin/Controller/BaseAdminController.php index 5a4020561..7c66c430b 100755 --- a/core/lib/Thelia/Admin/Controller/BaseAdminController.php +++ b/core/lib/Thelia/Admin/Controller/BaseAdminController.php @@ -83,7 +83,7 @@ class BaseAdminController extends ContainerAware catch (AuthenticationTokenNotFoundException $ex) { // No auth token -> perform login - return new RedirectResponse($this->generateUrl('/admin/login')); + return new RedirectResponse($this->generateUrl('admin/login')); } return $data; @@ -134,7 +134,7 @@ class BaseAdminController extends ContainerAware */ public function generateUrl($route, $parameters = array(), $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH) { - return "$route"; + return "thelia2/$route"; //return $this->container->get('router')->generate($route, $parameters, $referenceType); } diff --git a/templates/smarty-sample/pagination.html b/templates/smarty-sample/pagination.html index 5a5182177..cb06db66b 100755 --- a/templates/smarty-sample/pagination.html +++ b/templates/smarty-sample/pagination.html @@ -19,7 +19,7 @@ @@ -52,4 +52,43 @@ {if {$PAGE} != {$LAST}} - {/if} -{/pageloop} \ No newline at end of file +{/pageloop} + +
+Pagination before loop +
+{assign var=product_current_page value={$smarty.get.$this_product_getter|default:1}} + +{capture name="prod2"} + {loop name="prod2" type="product" page="{$product_current_page}" limit="2"} +
  • + #ID:#REF +
  • + {/loop} +{/capture} + +{pageloop rel="prod2"} + {if ${PAGE} != {$product_current_page}} + #PAGE + {else} + { #PAGE } + {/if} + {if {$PAGE} != {$LAST}} + - + {/if} +{/pageloop} + +{$smarty.capture.prod2} + +{pageloop rel="prod2"} + {if ${PAGE} != {$product_current_page}} + #PAGE + {else} + { #PAGE } + {/if} + {if {$PAGE} != {$LAST}} + - + {/if} +{/pageloop} + +