While reviewing some code in grails, I noticed that at a certain point specific code is reused in every controller and passed to the views to render a view section which can be normally be part of the main layout. The only problem is how to pass those values to the main layout from another point outside the specific controllers.
Any best-practice in dealing with similar cases of passing variables to the main layout?