KillCloud
KillCloud

Reputation: 17

Zend Layout issue

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:

enter image description here

Attempt page:

enter image description here

Upvotes: 0

Views: 114

Answers (1)

Mr Coder
Mr Coder

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

Related Questions