Q:

CakePHP question: Getting value from app_controller.php to layout.ctp

I have set values in app_controller.php and i can use those variable in 'default.ctp'.
My question is: is it a good idea to get value from app_controller.php beforeRender() action ?
Is there any other alternative to get value in default.ctp ?
What's the pros and cons of passing value from app_controller.php - beforeRender() action to 'default.ctp' ?

A:

is it a good idea to get value from app_controller.php beforeRender() action ? It depends. Are you getting values from DB? If yes, do you have to get it from DB? 
Is there any other alternative to get value in default.ctp ? If you don't say what kind of data, no one can answer that. 
What's the pros and cons of passing value from app_controller.php - beforeRender() action to 'default.ctp' ? Compared to what?

