Ok, well maybe I'm missing something with the pagination helper.  Do I
need to set the pagination parameters by hand?  Adding this line:

$this->paginate['page'] = isset($this->params['pass']['page']) ? $this-
>params['pass']['page'] : null;

seems to get the pages working, but similar additions for 'direction'
and 'sort' didn't work so well...  adding these three lines seemed to
work OK but it seems like a hack to me:

$this->paginate['direction'] = isset($this->params['pass']
['direction']) ? $this->params['pass']['direction'] : null;
$this->paginate['sort'] = isset($this->params['pass']['sort']) ? $this-
>params['pass']['sort'] : null;
$this->paginate['order'] = (isset($this->params['pass']['sort']) &&
isset($this->params['pass']['direction'])) ? 'Publication.' . $this-
>params['pass']['sort'] . ' ' . $this->params['pass']['direction'] :
null;

Thanks in advance.

Chowsapal wrote:
> Ok, well I've cut my routes.php down to one line to test, and switched
> to Router::connect('/:forum/:community_id/:controller/:action/*, null,
> array('community_id' => '[0-9]+')); from Route->connect.  I'm now able
> to get the pagination and sort links showing up right when I add url
> => array('forum' => $this->params['forum']) to the options array of
> sort(), next() and prev().
>
> Now I have a new problem:  it seems like the parameters aren't being
> processed at all.  The sort doesn't change at all if I hit the sort
> button, and I don't change pages when I hit the next button, but those
> options do show up in the url (sort:author/page:1/direction:asc,
> etc).  Any idea why that wouldn't be processed?  Is there a problem
> with the route(s) I'm declaring?
>
> Thanks again
>
> On Apr 15, 9:45 pm, "gwoo" <[EMAIL PROTECTED]> wrote:
> > if you have $Route::connect you are using the wrong code. the correct
> > is Router::connect. Also there is a test case for the Router, so feel
> > free to add your won test and see if it works.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to