You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can't render from a ViewModel, a ViewModel is just the container for the variables that are passed to the view. You'll need to render from a View Renderer, probably the PhpRenderer. I'm thinking we just need to add a working key in the service manager to return a valid php renderer, create a new view model to pass to it (not sure where at the moment) and then call the addTemplate method to add the templates (phtml files) that need to be rendered. It should then just be a case of calling the render method.
We need users to be able to render simple templates using Zend\View component.
The implementation should return a string from the controller action which will be executed as the HTTP body.
Bonus points: You return an instance of
Zend\View\ModelInterface
from the controller action and then tell it to render.The text was updated successfully, but these errors were encountered: