G
G
glebvvs2019-01-01 14:26:58
Zend Framework
glebvvs, 2019-01-01 14:26:58

How to pass a variable to Layout in zf3?

Hello. A fairly simple question arose. How can I set a variable in layout?
In the controller page itself, you can do this through ViewModel(['var' => 'value']);
And how to do the same, but pass it to the layout ??

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2019-01-01
@glebvvs

in output script/script, $this->layout()->var='value'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question