简体   繁体   中英

Proper Routing - Help Zend Framework

I am using zend pagination in my gallery and its unfortunetly not working right for me.

When using tags and search box in gallery -> next/another page is returning with no taging/searching

It should look like this:

gallery\page\2\?s=&tag=9

but instead I have this:

gallery\page\2

What can I do about that?

'gallery' => array(
    'type' => 'Segment',
        'options' => array(
            'route' => '/generator_nowy/gallery[/page/:page/]',
            'defaults' => array(
                'controller' => 'Men\Controller\FrontController',
                'action' => 'gallery',
                'page' => 1,
            )
        ),
'may_terminate' => true
),

Try

'gallery' => array(
  'type' => 'Segment',
  'options' => array(
    'route' => '/generator_nowy/gallery[/page/:page/]',
    'defaults' => array(
       'controller' => 'Men\Controller\FrontController',
       'action' => 'gallery',
       'page' => 1,
    )
  ),
  'may_terminate' => true,
  'child_routes'  => array(
    'query' => array(
      'type' => 'Query',
    ),
  ),
),

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM