I use <?= $this->layout()->content ?> in my layout.phtml. That works for
all actions that render their own action.phtml in place of the
layout()->content bit. I don't know about $this->content() that you seem
to be using.
Bart McLeod
Matthew Ishii schreef:
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)
-Matthew R Ishii