pagination - how to change part of url from cakephp's paginator options? -
have custom pagination in cakephp view. before made custom routing changes.
problem links leads pages like
http://localhost/myapp/foos/view/news/page:2
instead of
http://localhost/myapp/news/page:2
so, part foos/view/ not have part of link.
tried change url several custom options, like
$this->paginator->options(array('url' => $this->passedargs));
but no luck, because have foos/view/ in url.
can me how can rid of foos/view?
thank in advance!
update: manage "something", not enough, adding following lines:
$options = array('url'=> array('controller' => 'news' ) ); $paginator->options($options);
now, link looks like:
http://localhost/myapp/news/index/page:2
how can rid of "index" in url?
the following line more passing various pieces of url information view:
$this->paginator->options(array('url' => $this->passedargs));
i think want helper declaration in controller:
var $helpers = ( 'somehelper', 'anotherhelper', 'paginator' => array( 'url' => array('controller'=>'news') ) );
if want finer control of custom route 1 have try
'url' => '/news'
i haven't used paginatorhelper in while - egregiously on wrong track - believe that's start.
also, take @ the paginator helper page mentions $options , take @ router::url() former page recommends.
Comments
Post a Comment