custom pagination url

2007-08-08 Thread hausburger

hello.

i defined for some parts of my new project some custom-made urls in
the routes definition, they look like this:

Router::connect('/groups/:group_url/:action/*',array('controller' =
'groups', 'action' = 'show'));

Example:
http://mywebsite.com/groups/the-name-of-a-group/topic/10/

$this-params['action']  =  topic
$this-params['controller']  =  groups
$this-params['group_url']  =  the-name-of-a-group


in the groups controller:

// show messages that belong to topic

public function topic($id) {

$this-paginate = array(
'limit' = 15,
'page' = 1,
'order' = 
array('GroupMessage.created' = 'asc')
);

$this-set('messages', $this-paginate('GroupMessage',
array('GroupMessage.group_topic_id' = $id)));
}

Everything works fine at the first page, 15 rows and the pagination-
numbers are displayed in the view ...
but the generated urls look like this:

http://mywebsite.com/groups/topic/page:2


How can i force the pagination to show a custom url. I played with the
$this-paginate[url] ... but it without success. Any ideas?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: custom pagination url

2007-08-08 Thread hausburger

a hint from felix fixed my problem:

in the view:

?php
 $paginator-options['url']['action'] = '-whatever';
?




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---