After many hours of frustration, I am finally posting here for some
help.
I have the default pagination links on an index page like this which
are passing all params variables:
<div class="paging">
<?php echo $paginator->prev('<< '.__('previous', true), array(),
null, array('class'=>'disabled'));?> | <?php echo $paginator-
>numbers();?> <?php echo $paginator->next(__('next', true).' >>',
array(), null, array('class'=>'disabled'));?>
</div>
However, the links produced are the following:
http://localhost/test/spots/index/newyorkcity/page:2
The correct url should look like this:
http://localhost/test/newyorkcity/spots/2
After setting up the router like the following, the above "real" url
is accessible:
Router::connect('/:location/spots/:page', array('controller' =>
'spots', 'action' => 'index'), array('pass' => array('location'),
'location' => '[a-z]+'));
Does anyone have any tips on how to proceed with this to fix the
pagination link?
Thanks!
Daehee
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---