Dateve,
I am working on the same thing, but am certainly more of a beginner than
you are.
What is this Pagination object?
Is this the component from ad7six on cakeforge?
I guess I am dumb enough I need a step by step (typing slowly, so that I
can follow) explanation.
Thanks for this post, it helps a lot, actually!
Bernard
> Thanks for your help! With your assistance I solved the problem.
>
> For those of you that might encounter the same Cake Pagination Problem,
> this is how I fixed it:
>
> My Controller:
> -------------------
> /**
> * Index Action.
> */
> public function index($criteria = NULL) {
>
> $this->pageTitle = 'Throbbin Hood :: Porno for the masses since
> 1853';
>
> // If we JUST clicked the search button
> if(isset($this->data['form']['search'])) {
>
> // Let's clean our search
> uses('sanitize');
> $toiletDuck = new Sanitize();
> $cleanDuck = $toiletDuck->sql($this->data['form']['search']);
>
> // Redirect to ourself with the new with new parameters
> $this->redirect('passwords/index/'.$cleanDuck);
> }
>
> // If we were redirected from ourself with new parameters
> if($criteria) {
> $search_value = $criteria;
> $criteria = array('Password.url' => "LIKE %{$search_value}%");
> }
>
> // Initialize the pagination object, get results from the database,
> and set it for the view
> list($order, $limit, $page) = $this->Pagination->init($criteria);
> $passwords = $this->Password->findAll($criteria, NULL, $order,
> $limit, $page);
> $this->set('passwords', $passwords);
>
> // Tell it what page to view.
> $this->render('index');
> }
> --------------
>
> Thanks again.
>
>
> >
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---