how could I add some variables to my layout.phtml?
I could add it in every Controller like here: Sending variables to the layout in Zend Framework
But that’s not really suggestive and in the Bootstrap I don’t want to add it too.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could create a front-controller plugin called LayoutDefaults:
In your Front Controller:
In your layout.phtml:
And finally, in your controllers, override the default as needed: