Hello Chris,

Yesterday I had the same problem, when programming a fulltext search.
Should also work for filtering.

I solved it this way:

// this is my search action in my controller
function search(){
    // if I got a search text string from the form, then overwrite
    if (!empty($this->params['form']['searchtext'])){
      $this->params['pass']['searchtext'] = $this->params['form']
['searchtext'];
    }

    if(!empty($this->params['pass']['searchtext'])){
      // process search text string, building conditions and query the
results
    }else{
      // no search text typed in
    }
}


... and in the view ...
// reset the page parameter before printinge next/prev links,
otherwise pagination doesn't work correctly
unset($this->params['pass']['page']);

// It's important, that you pass $this->params['pass'] as the url to
the next/prev links:

print $paginator->prev('<<', array('url' => $this->params['pass']),
null, array('class' => 'disabled'));
print $paginator->next('>>', array('url' => $this->params['pass']),
null, array('class' => 'disabled'));


This works fine for me, I hope, this helps!

Greets, Christoph


--~--~---------~--~----~------------~-------~--~----~
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