Reputation: 17
I have a main layout, and i call my login form in this layout. This login form stay in the header of the page, because this i can't put this in the view.
If the user wrong your email or password, will be redirect to attempt page. In this page, i need remove this login form in the header, and call the login form in the view.
But i am not interested in create another layout for do this, someone know how i can do this?
My main page:
Attempt page:
Upvotes: 0
Views: 114
Reputation: 8196
Use zend view placeholder helper
In your layout.phtml
<?php if(!$this->placeholder('hide_login_form')) :?>
<?php echo new My_Login_Form(); ?>
<?endif:?>
Now Inside your login Action where you want to render full page form do
public function loginAction()
{
$this->view->placeholder('hide_login_form')->set(true);
}
Upvotes: 2