The routing configuration is invalid:
'/user[/:action][/id/:id][/page/:page]',
How is this supposed to work? What's the order of the optional parts? :)
You probably want to have:
'/user[/:action[/id/:id[/page/:page]]]',
instead
Marco Pivetta
http://twitter.com/Ocramius
http://ocramius.github.com/
On 12 May 2013 17:26, whisher whishe...@gmail.com wrote:
Hi,
module.config.php
router' = array(
'routes' = array(
'btitadmin_route' = array(
'type' = 'literal',
'options' = array(
'route'= '/admin',
'defaults' = array(
'controller' =
'BtitAdmin\Controller\AdminController',
'action' = 'index',
),
),
'may_terminate' = true,
'child_routes' = array(
'user' = array(
'type' = 'segment',
'options' = array(
'route' =
'/user[/:action][/id/:id][/page/:page]',
'constraints' = array(
'action' = '[a-zA-Z][a-zA-Z0-9_-]*',
'id' = '[0-9]+',
'page' = '[0-9]+',
),
'defaults' = array(
'controller' =
'BtitAdmin\Controller\UserController',
'action' = 'index',
'id'=0,
'page'=1
),
),
),
BtitAdmin/view/btit-admin/user/index.phtml
echo $this-paginationControl(
$paginator, 'Sliding', '/partial/paginator',array('route'
='btitadmin_route/user')
);
BtitAdmin/view/btit-admin/partial/paginator.phtml
echo $this-url($this-route, array('page' = $page));
the problem is when I click on the link I got
admin/user/page/2
instead of
admin/user/index/page/2
Can you help me,please ?
Thanks in advance.
--
View this message in context:
http://zend-framework-community.634137.n4.nabble.com/zend-2-pagination-control-route-default-action-tp4660004.html
Sent from the Zend Framework mailing list archive at Nabble.com.
--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com