php - what i need for invoke various actions and view in my layour main
well i trying build a website on ZendFrameWork 2 i want execute various actions in my layout main like a fild of search, or a form for loguin etc. each one of this i believe should are in views diferents with your actions, how i do for references this actions with your views that will return this element for i put where i want in my layout. like the helper $this->content; where it return the context view and action no just the view with no function, which are the best way for i do this or a way alternative
I think what you need are view partials. You can read on view partials in the ZF2 official documentation.
You have to create your partials and then you register them under your
Then in every layout you can simply embed them like this:
If you need to pass variables to your partials you can pass a second argument: