views:

45

answers:

1

Let me start with the things that I did and how am I using some things to get results

I have set up modular structure as:

application/
    /configs
    /layouts
    /models
    /modules
         /users
         /profile
             /frontend
             /backend
                 /controllers
                 /views
              ....
  1. I write a plugin that does addes changes with FrontController->setModuleControllerDirectoryName() FrontController->addModuleDirectory() and It is all good I have a changed all the directories according weather admin page is requested in the url or not (it is some thing like /admin/some/some)

  2. Let's say I have a single layout for anything that is related to Profile viewing , in this case the "Profile" module. The Profile layout is divided into three parts

    alt text

In the layout I was pulling out the Profile/PhotoController 's index action with a action()

$this->action('index', 'photo', 'profile');

Then I have faced few issues 1. Can get passed Params inside the Photo Controller when calling ( profile/profile/index); 2. found out that helper Action() is evil cause it starts another dispatching loop =) --- and now I am thinking that my approach on plugging in controllers modules into layout also evil =). anyhow how Should I deal with plugging in some controllers (another module controllers) into the layout ?

A: 

Okay to be honest your project structure is not clear enough like :

 /profile
             /frontend
             /backend
               /controllers
               /views

profile is a module so what is forntend and backend any way what i understand is : you are willing to execute the Profile/PhotoController on the dashbaord layout I might be wrong but i guess create a service or class in your namespace and action helper or in your case it should be view helper to execute that newly created class

you will find more info on this book chapter 10 - Page 295 - Services for cross module communication

Hopefully I made a clue

tawfekov