I have to add a feature to a quite big app using zend framework.
i have a view. in that view, i have a if and want to include an other .phtml on the same location.
so, at the moment i got something like
if (x = true)
require_once(the other file);
that works, but isnt in the meaning of zend. i’ve been told i should use view helpers, more specific, the partial. so, how do i include a phtml file with the partial? i dont get it.
Use the
render()view helper like this:All view variables available in the current .phtml script will be available in
the other.phtmltoo.If you want to render the other view script with specific view variables, use
partialinstead: