0

I am trying to use Zend_View but facing interesting issue, here is my code in controller.

$view = new Zend_View();
$view->setScriptPath(APPLICATION_PATH . '/views/scripts/account/');
$view->render("add.phtml");

and in add.phtml I do have below code to include header..

<?php echo $this->render('includes/header.phtml')?>

but it says "script 'includes/header.phtml' not found in path 'application path/views/scripts/account/)".

while I am able to include header file in other view files.

Please advise why it is looking under absolute path in views..

KJ..

kj007
  • 6,073
  • 4
  • 29
  • 47
  • Have you thought about using layouts or view helpers rather than an html include? – liz Sep 27 '12 at 19:26
  • 1
    Is `APPLICATION_PATH` defined before that setScriptPath line? – Tim Fountain Sep 27 '12 at 19:27
  • Yes application path is defined as controller is allowing me to go on add.phtml, issue is not in setscript path, issue is when i am including file from view.. – kj007 Sep 28 '12 at 08:07

0 Answers0