Sorry, you've lost me. So, the "city" param is already in the URL?
What is it that you need to do?

On Fri, Jul 17, 2009 at 8:51 PM, Isaac Raja<[email protected]> wrote:
> no. i'm just manipulating the  the url as a string and replacing it with the
> users selected city. Here's my code.I know the code is bad. but i'm thinking
> of a way to overcome it.
>
>
>         $id = $this->params['url']['city'];
>         $this->Category->Post->City->id = $id;
>         $this->data = $this->Category->Post->City->read();
>         $subdomain = low($this->data['City']['city']);
>         $domain =  Configure::read('Site.domain');
>         $urll = '';
>         $urll = 'http://';
>         $urll .= !empty($subdomain)?$subdomain.'.':'www.';
>         $urll .= $domain;
>         $urll .= $this->params['url']['url_here'];
>         if(!empty($this->params['url']['keyw']))
>         {
>
>           $urll .= '/keyw:'.$this->params['url']['keyw'];
>         }
>         $this->Session->write('Current', array('id' => $id, 'city' =>
> $subdomain));
>         $this->redirect($urll,null,true);
>
>
> Thanks
> Isaac
>
> On Fri, Jul 17, 2009 at 11:55 PM, brian <[email protected]> wrote:
>>
>> How are you creating the links? With HtrmlHelper?
>>
>> On Fri, Jul 17, 2009 at 1:10 PM, Isaac Raja<[email protected]> wrote:
>> > any ideas?
>> >
>> > On Fri, Jul 17, 2009 at 6:26 AM, Isaac Raja <[email protected]> wrote:
>> >>
>> >> Hi all,
>> >>
>> >> I'm developing  a  web application, in which the when the user adds a
>> >> filter, it is appended to the url, for example
>> >>
>> >>
>> >>
>> >>
>> >> http://www.classifieds.my/categories/list_post/category_name/price:245/title:something/keyword:somethingelse/name:newname
>> >>
>> >>
>> >> Everything is working fine now, But I want the user to add the filter
>> >> city. When the  user clicks a particular city link,  the above url must
>> >> be
>> >> turned into
>> >>
>> >>
>> >>
>> >> http://cityname.classifieds.my/categories/list_post/category_name/price:245/title:something/keyword:somethingelse/name:newname
>> >>
>> >> ie) i don't want to loose other filters .  I have done an ugly hack, in
>> >> which i get the url from $this->here and replace the sudomain part.
>> >>
>> >>
>> >> Is there a cake way to do it. Or how to implement this feature in
>> >> cakephp?
>> >>
>> >>
>> >> Thanks
>> >> Isaac
>> >
>> >
>> > >
>> >
>>
>>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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