简体   繁体   English

正确的路由-帮助Zend框架

[英]Proper Routing - Help Zend Framework

I am using zend pagination in my gallery and its unfortunetly not working right for me. 我在画廊中使用zend分页,不幸的是它不适用于我。

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',
    ),
  ),
),

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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