i have a layout used by all my views and i need to assign a variable from a controller to this layout , if i use this method on a controller it doesn\'t work :
p
Have you tried:
$this->layout()->testvar = 'bla';
Using the layout controller plugin you can retrieve the ViewModel object that is used in layout.phtml.
layout
layout.phtml