Dmitry Makovetskiyd
Dmitry Makovetskiyd

Reputation: 7053

Cannot display view variable value

That is my controller: (file name: AboutController.php)

class AboutController extends Zend_Controller_Action
{

public function init()
{
    /* Initialize action controller here */
}

public function indexAction()
{
    $this->view->pageTitle="GameNomadTitle";
}

public function contactAction()
{

}


}

And that is my view that is Associated with it. (file name: index.phtml)

    enter code here<br /><br />
<div id="view-content">


<title><?= $this->pageTitle; ?></title>


Links: Homepage – NFO


</div>

The title doesnt seem to be appear..why is that?!?

Upvotes: 1

Views: 83

Answers (1)

karim79
karim79

Reputation: 342635

Try removing the space between the = and the variable you are trying to output:

<?=$this->pageTitle; ?>

better still, don't use short tags:

<?php echo $this->pageTitle; ?>

Upvotes: 2

Related Questions