View Single Post
  #1 (permalink)  
Old 06-23-2008, 05:29 AM
Matt1776's Avatar
Matt1776 Matt1776 is offline
Junior Member
 
Join Date: Jun 2008
Location: Orange County, California
Posts: 15
Send a message via Yahoo to Matt1776 Send a message via Skype™ to Matt1776
Default How to use same Zend_Layout for two actions

Hi,

I have specified two actions for my IndexController. One is the default indexAction and the other is called loginAction. I have sucessfully invoked and configured the ZendLayout in my bootstrap.php file, and the content for the master layout is the index.phtml view script that i created for the default controller action IndexController::indexAction.

The problem is ive added IndexController::loginAction and a new view script called login.phtml. However when I link to the view script, I loose all my headers, footers, css, everything from the layout is gone.

I was under the impression that the layout master script applied to all the actions and corresponding views within a controller. However in my case the layout master is only taking its '$this->content()' from the index.phtml and not taking it from the login.phtml when I call it by URI.

What am I missing? Ive gone through the documentation for Zend_View and Zend_Layout many many times. Help! ;0)
__________________
Bugs that go away by themselves come back by themselves
Never take life seriously, Nobody gets out alive anyway.
Reply With Quote