Router paginator

Hello!

         <p class="pagination">
          <a href="page/1">first</a>
          <a href="page/<?=$model_releases->before; ?>">prev</a>
          <?php echo "Page ", $model_releases->current, " from ", $model_releases->total_pages; ?>
          <a href="page/<?=$model_releases->next; ?>">next</a>
          <a href="page/<?=$model_releases->last; ?>">last</a>
      </p>

$router->add( "/page/{page:[0-9]+}", array( 'controller' => 'index', 'action' => 'index' ) ); when on main page i have addres on pagination with prefix "page", click to any page on pagin and have double "page" like this "/page/page/3. Why wrong and how this fix?



4.2k

imo you need to change

href="page

to

href="/page


877

No, need add "page" to adress because used on defferent page but identical construct. One view for three adress.