In my index/index action, I’m calling a form class that I created, and output the form in the index.phtml view like this
<?php
echo $this->form;
But when I view the page source, all I’m getting is the form markup. I don’t get any HTML HEAD BODY tags to make this a valid markup page. How do I add these to all my pages?
I have layouts/scripts/layout.phtml but I’m not sure what’s the correct way to use it.
It sounds like you have not enabled the layouts.
The typical way to so this is via your
configs/application.ini file:The file
application/layouts/scripts/layout.phtmlshould have the html code for your template, typically employing (as noted in the answer by @Alkexander) the view-helpersheadLink(),headScript(), etc.See Zend Framework: Documentation: Using Zend_Layout