Layout funciona somente no action index
Pessoal, tenho o seguinte:
CONTROLADOR
public function indexAction()
{
$this->view->title = "Carros";
$this->view->headTitle($this->view->title);
$carros = new Application_Model_Carros();
$this->view->carros = $carros->getCarros();
}
public function editAction()
{
$this->view->title = "Editar";
$this->view->headTitle($this->view->title);
$carros = new Application_Model_Carros();
if($this->getRequest()->isPost())
{
$formData = $this->getRequest()->getPost();
$carros->updateCarro(
$formData['idcarro'],
$formData['modelo']
);
$this->_helper->redirector("index");
}
else
{
$idcarro = $this->_request->getParam("idcarro");
$this->view->carro = $carros->getCarro($idcarro);
}
}
LAYOUT
<!-- contentSite -->
<div id="contentSite">
<?php
echo $this->layout()->content;
?>
</div>Porem só o action Index aparece no meio do layout, meus outros actions não. Alguem sabe o que pode ser?
Valeu!
Discussão (4)
Carregando comentários...