Thread: Smarty trouble
View Single Post
  #2 (permalink)  
Old 07-28-2007, 04:33 PM
misaak misaak is offline
Junior Member
 
Join Date: Jul 2007
Posts: 3
Default

Quote:
Originally Posted by MasterSID View Post
While starting creation of admin area module for my project (where I use smarty wrapper as a default view class) I've faced with one problem. My project consists of two ZF modules: default and admin. In both modules there are similar controllers and actions names, e.g. indexController::indexAction(). As as result I have a problem with smarty. It returns the same compiled file for Index actions in Index controller for both modules. Did anyone face with the same trouble?
I've tried it and i have the same problem. So here is my problem solution.

PHP Code:
class My_Controller_Action extends Zend_Controller_Action
{
    function 
init()
    {
................
        
$this->view->setCompilePath('../tmp/templates_c/' $this->getRequest()->getModuleName());
................
    } 
my directory structure:
Code:
/application
    /admin
    /default
/library
/public_html
/tmp
    /templates_c
        /admin
        /default
      ......
You must create for each module directory in tmp/template_c.

I'm sorry for my bad english.

Last edited by misaak : 07-28-2007 at 04:45 PM.
Reply With Quote