There is something wrong with you variable or index.ctp
otherwise the code, u have shown should work properly.
Jaydeep Dave
On Sat, Jul 25, 2009 at 8:40 PM, 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 ?>;
--
Regards,
Jaydeep Dave
Mobile: +919898456445
Email: jaydipdave@yahoo.com
--~--~---------~--~----~------------~-------~--~----~
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:
Post a Comment