loading layouts
I use to have code in my boot strap that looked for layouts in my layouts directory
Zend_Layout::startMvc(array('layoutPath'=>'../application/layouts'));
Now when I try this on RC1 I get cannot redeclare class ........
<?php
error_reporting(E_ALL|E_STRICT);
ini_set('display_errors', 1);
date_default_timezone_set('America/Phoenix');
set_include_path('.' . PATH_SEPARATOR . '../library' . PATH_SEPARATOR . './application/default/models/' . PATH_SEPARATOR . get_include_path());
require_once 'Zend/Controller/Front.php';
Zend_Loader::registerAutoload(); // autoloads stuff as we make calls
/**
* Setup controller
*/
$controller = Zend_Controller_Front::getInstance();
$controller->setControllerDirectory('../application/default/controllers');
$controller->throwExceptions(true); // should be turned on in development time
Zend_Layout::startMvc(array('layoutPath'=>'../application/layouts'));
// run!
$controller->dispatch();
--------------------------------------------
I get class Zend_Layout not found.
What new code do I need to load layouts?
I have found clues but have been unable to fix my problem.
Thanks in advance,
Sean
Last edited by seank : 06-05-2008 at 09:04 PM.
|