Reputation: 186562
Ahh forgive my Zend newbness, I'm trying to access this form, stored in:
layouts/scripts/layout.phtml
:
$this->layout()->userForm = $this->action('index', 'user');
within
class IndexController extends Zend_Controller_Action
{
public function init ()
{ /* Initialize action controller here */
}
public function indexAction ()
{
// here
}
}
The indexAction, I basically need the form to show up on the homepage in addition to being in the layout.
I tried accessing it with $this->_helper->layout()->userForm
but I suspect the code in the controller runs before the layout as it wasn't giving me what I wanted.
Upvotes: 2
Views: 1467
Reputation: 40675
I don't understand your question really.
Like so:
$userForm = new UserForm();
$this->view->userForm = $userForm;
Upvotes: 4
Reputation: 27313
I think
$this->_helper->layout->userForm
should do it.
after I don't know why you don't reuse the
$this->action('index', 'user');
in your view appears to be more much simple IMHO.
Upvotes: 1