Hi all,

Got a problem. I have a search-form in my layout, that (after
submitted) will start search for realestates that fit in the search
request.

So far, so good.

But now i want one field to depend on the database. I want people to
be able to select the city wherein they want to search, and for that,
it must only be possible to select cities whereof the database has
realestates of. So i guess i have to move the searchform to something.

First i thought i'd made a component which will select all cities.
Then, place the component in app_controller.php, so every controller
uses it. And then the cities would be available in the layout.

The only problem was i didn't know wheter this would work: would it be
possible for the layout to access the cities variable?

Then i thought i'd do a requestAction at the place the form should go,
and make a action that would select the cities, with a view that only
shows the form.

The problem with that is that it isn't very efficient. RequestAction
would be called with every request the site makes, and i read
somewhere that requestAction really slows down the execution.

So how do you think about this? What would be the best solution of
these two, or is there a totally different way i should do this?

Thanks in advance,
MYRZ


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

Reply via email to