I have a LoginController, Login Model and Login View that matches.
On the login.phtml file I can use <?php $this->form; ?> to output the form as specified in the Login model.
I would like to however place this same “view” into the index.phtml file that has a different class and model etc..
How would I do this?
You can use partial view helper when some html is shared between different views.
Edit:
I forgot to wrote that there is also an action helper called viewRenderer that can be used to render different view script than the default one. For example, you could load login.phtml in your indexAction as follows: