You can pass the variable to the element like so:

$this->element('view', array('veryimp' => $veryimp));

On Feb 4, 9:42 pm, Malcolm Krugger <[email protected]>
wrote:
> Suppose I define a variable in one .ctp file..i.e header.ctp $veryimp
>
> and if I renderelement another subheader.ctp file inside the
> header.ctp file
>
> How can I access the value of $veryimp from the new subheader.ctp
> file ?
>
> Is it possible if not what is the workaround to define GLOBAL
> variables which can be accessed by all the view files .ctp ?
>
> Malcolm
--~--~---------~--~----~------------~-------~--~----~
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