Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

How to set routing for dynamic GET Parameters

Hi Guys,

I am using Phalcon Paginator. Instead of


i would like to have


How do i do this using routing? This is what i come of with, but does not work.

    $router->add('/products/list/:params', array(
    'controller' => 'products',
    'action'     => 'list',
    "params"     => $_GET['page']

Advice appreciated!



$router->add('/products/list/{page:[0-9]+}', array(
    'controller' => 'products',
    'action'     => 'list'
class ProductsControler ...
    public function listAction($page = null)