Afternoon all,

I've just spent way too much time on my search function trying to make
it as good as possible. I'm a medium level PHP developer so I know
where I want to be but there are a few steps I'm missing in getting
there.

Basically, what I would like is a search function similar to that
found on forums such as phpBB (i think).

1. A user enters search terms, selects a few filters, then hits the
search button.

2. They are redirected to a screen that displays a 'Processing'
message and possibly image.

3. Once processing is complete they are redirected to the results screen.

I've done a search on google for a tutorial or examples and haven't
found any (any links welcome). there was talk of a search component in
these groups a while back but nothing in the forge just yet (hence
writing my own). so i've just got a couple of questions to work out if
what I've done is actually going to be possible in Cake.

What I have done is:

1. Use a form to POST search terms (and filters etc) to my controller
which passes these to my search component.

2. Search component then processes these keys and filters and records
them to the session.

2.b. At this point I also render my view (which calls my search
element and helper functions). The element picks up the fact that it
is processing and displays the processing screen.

2.c. After I call (from the component) $this->controller->render() to
display processing screen in the view, I do not exit or return. rather
I have allowed the component to continue processing the results in the
hope that the processing screen will display while the hard yards are
completed  by the component.

3. Once the search processing is complete I then record the results to
the session and redirect to the same controller and action where they
are then processed by the element (and helper) and output to the
screen.

Now, this works as far as I receive my results and everything is cool.
At the moment I haven't got enough data for this to take more than a
second (kind of defeats my entire question but...).

What I'm looking for more is, am I on the right track? Is this the
best method of doing this with CakePHP or would someone recommend a
different method?

Also, I always welcome comments as to best MVC and Cake practices so
if I've screwed anything up completely please say the word.

Once it is all done and dusted I'll post to the paste bin or the
bakery so other people can use it if they wanted to. I think I may
have overcomplicated but... you never know.

Thanks again,
mikee

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

Reply via email to