[Flow] How to access to main layout in another package?

Pankaj Lele pankaj at lelesys.com
Tue May 21 09:24:50 CEST 2013


Hi Axel,

> in order to have a better module structure within an application, it 
> would be great to be able to access a fluid layout and theme ressources 
> which reside within another package. Is it possible an if so, how to 
> achieve that?

Yes, it is possible.

If you have your layout in PackageA then in PackageB you can have an 
AbstractController with "protected function initializeView($view)" 
which is declared (empty) in the parent controller classes. So inside 
this initializeView method you can call 
$view->setLayoutPathAndFilename('resource://PackageA/Private/Templates/Layouts');. 
Then you can have your controllers in PackageB extend to the 
AbstractController and the layouts from the PackageA can be used.

Enjoy the TYPO3Flow :)

-Pankaj

-- 
Pankaj Lele
CTO - Lelesys, India
http://www.lelesys.com
Twitter: @pankajlele



More information about the Flow mailing list