Sunday, July 26, 2009

Re: 'set' and 'render' together? access set variables from different view?

Is there an underscore in the actual variable name?

On Sun, Jul 26, 2009 at 12:40 AM, Josh<joshs.silverman@gmail.com> wrote:
>
> This seems like a very simple question, but I have been struggling
> with it for quite a while. How can I use the 'set' function and then
> the 'render' function while still being able to access my set
> variables from the view? It seems to me that 'set' only makes
> variables available in the view that matches the action. How can I get
> around this?
>
> e.g.
>
> //exampleController
>
>                $this->set('a', $a);
>                $this->render('index');
>
> //index.ctp
>
>                <?php echo $a ?>;
>
> >
>

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