View Single Post
  #2 (permalink)  
Old 12-28-2007, 06:59 PM
blurphp blurphp is offline
Junior Member
 
Join Date: Dec 2007
Posts: 11
Send a message via MSN to blurphp Send a message via Yahoo to blurphp
Default

If I understand the Docs right your controller path is the path from your includes path

I have this set in my ootstrapper file
Code:
set_include_path(dirname(__FILE__) . '/library' . PATH_SEPARATOR . get_include_path());
Libary is where the Zend frameowrk is. Here is my directory structure
Code:
/application
    /config  --holds zf config file
    /controllers
    /models
    /Smarty  -- Smarty specific folders
         /cache
         /config
         /templates
         /templates_c
    /views
         /index
         /user
/library
    /Smarty  --  holds all smarty files
    /Zend  --  holds all zf files
.htaccess
index.php  --  bootstrapper file
ANd set the controllers up as I have severel here is an example

Code:
/*
* Setup the controller
*/
$front = Zend_Controller_Front::getInstance();
$front->setControllerDirectory(array(
'default' => 'application/controllers',
'blog' => 'modules/blog/controllers',
'news' => 'modules/news/controllers',
'chat' => 'modules/chat/controllers',
'forum' => 'modules/forum/controllers',
'calender' => 'modules/calander/controllers',
'cart' => 'modules/cart/controllers',
'games' => 'modules/games/controllers'
));
$front->throwExceptions(true);

/*
* Run the page and display it  GO!!!
*/
$front->dispatch();
I am still new to ZF ut this has been working fine for me and it makes it more portable.
Reply With Quote