Tuesday, October 26, 2010

Re: show url parameters in a view

in one view print_r $this->params

pr($this->params);

you can just use:

print $this->params["pass"]["0"];

or you can set variables from controller

--
Tilen Majerle


2010/10/26 Briko03 <nathanrlarkin@gmail.com>
I am not sure how to display it on the page. I am very new to cakephp.

On Oct 26, 11:37 am, Tilen Majerle <tilen.maje...@gmail.com> wrote:
> so now, what actually you want...u have it in $this->params, so where is
> problem? :D
> --
> Tilen Majerlehttp://majerle.eu
>
> 2010/10/26 Briko03 <nathanrlar...@gmail.com>
>
> > I have an action that is going to display results by the person...
>
> > function person($lname,$fname)
> >    {..........blah blah......}
>
> > I have my person.ctp file that I want so show the url parameters...
> > for example see below
>
> > url: domin.com/controller/action/$lname/$fname
>
> > <h1>Results for $lname</h1>
>
> > I know they are available in $this->params['pass'] however I am not
> > sure how to use them in this instance....
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscribe@googlegroups.com<cake-php%2Bunsubscribe@googlegroups.com>For more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
 
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: