1. If you need to use that variable in controllers then you can set it in 
the beforeFilter and if you need to access the variable in views then 
beforeRender both you have to do in AppController.

2. Please follow this http://book.cakephp.org/3.0/en/views.html

On Thursday, March 17, 2016 at 10:26:13 AM UTC+5:30, Attachai Saorangtoi 
wrote:
>
> *1. How to set a variable and use everywhere?*
>  
> *2.How to send a variable to Layout and Element?*
>
>
>

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to