Hi Adael; Hi Miles,
I am not very thorough in this regards, I was trying to build a
Advanced search form for my site.
I am using $this->passedArgs. The controller code for this function is
as under:
if (!empty($this->passedArgs)) {
if(isset($this->passedArgs['Medicine.keyword'])) {
$keyword = $this->passedArgs['Medicine.keyword'];
$this->data['Medicine']['keyword'] = $keyword;
$this->set('keyword');
} else {
$keyword = null;
}
if(isset($this->passedArgs['Medicine.author_id'])) {
$author = $this->passedArgs['Medicine.author_id'];
$this->data['Medicine']['author_id'] = $author;
$this->set('author');
} else {
$author = null;
}
if(isset($this->passedArgs['Medicine.field'])) {
$area = $this->passedArgs['Medicine.field'];
$this->data['field']['field'] = $area;
$this->set('area');
} else {
$area = null;
}
$conditions = array(
"Medicine.author_id LIKE" => "%$author%",
"Medicine.field LIKE" => "%$area%",
"or" => array(
"Medicine.name LIKE" => "%$keyword%",
"Medicine.description LIKE" =>
"%$keyword%"
))
;
} else {
$this-
>redirect(array('controller'=>'medicines','action'=>'search'));
}
Please, anyone advice me a direction for getting proper url of search.
Regards,
Jayesh
On Mar 15, 3:45 am, Miles J <[email protected]> wrote:
> What are you using to generate the named params?
>
> On Mar 14, 2:15 pm, Adael <[email protected]> wrote:
>
>
>
>
>
>
>
> > You can do the following:http://pastebin.com/JAup00Hn
>
> > On 14 mar, 20:00, "Mr.Jayesh" <[email protected]> wrote:
>
> > > Hello Everyone,
> > > Hope things Great..
>
> > > Anyone please advice me a quick solution from which i can hide model
> > > name from my URL created out of search string.
>
> > > currently my url looks
> > > like:http://my.website.com/medical/results/Medicine.search:cancer/Medicine...
>
> > > I wanted it to be like
> > > this:http://my.website.com/medical/results/search:cancer/author_id:5
>
> > > Thanks in advance.
> > > Regards.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php