hi AD

Thanks for your reply. That helped. But there seems to be some kind of
inconsistency.
When I use $this->params, i Get an array like this
Array(
          ['pass'] => Array([0]=> [key1]=>v1 [key2]=> v2),
          ['controller'] = 'controller_name',
          ['action'] = 'action_name',
          ...
          ...
     )

That's fine
But when building a url, $html->link requires an array in this format
Array(
          [0]=>
          [key1]=>v1
          [key2]=> v2,
          ['controller'] = 'controller_name',
          ['action'] = 'action_name',
          ...
          ...
     )

Although, I can see why this might be done, but its inconsistent with
the way $this->param returns the array
Just a thought

Regards,
Ritesh
On Nov 3, 6:17 am, AD7six <[EMAIL PROTECTED]> wrote:
> On Nov 3, 1:20 am, bingo <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > hi
>
> > I am trying manipulate the url to provide different link options in
> > the view. Although I can get all the parameters using
> > Router::parser(Router::url("")), I am not sure how can I pass back the
> > parameter array and get a valid url. Below is an example of what I am
> > trying to do
>
> > Assume that I have a url controller/action/key1:v1/key2:v2/key3:v3
>
> > In the view, I want to build two different urls
> > First url - controller/action/key1:v1/key3:v3
> > Second URL - controller/action/key2:v2/key3:v4   (yes, I want to
> > modify value of key3)
>
> > Using Router::parser(Router::url("")), I can an array of all
> > parameters, controller, and action. But I couldn't find any method
> > that can take the same kind of array and can give me back a valid url
>
> > Any help will be appreciated
>
> > Regards,
> > Ritesh
>
> You don't need to user Router::parse and Router::url to know what the
> current url looks like as an array, it's already there in $this-
>
> >params['pass'].
>
> Use that as your base and pass that to $html->link and you are good to
> go.
>
> hth,
>
> AD- Hide quoted text -
>
> - Show quoted text -


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

Reply via email to