[Flow] Using Partials of other Packages
Felix Rupp
felix.rupp at gmail.com
Wed Jun 5 12:14:22 CEST 2013
Hi Stefan,
I use to set the partial root path in an abstract base controller. In this abstract base controller, you have to implement the initializeView method with the corresponding method calls. All controllers which have to use the new partial root path must extend this abstract base controller. I see the possible problem with the dependencies between the packages, but this is a fact you can't avoid. If anyone has a better, more dependent solution, it would be great to hear about.
Example:
/**
* Initialize the view
*
* @param \TYPO3\Flow\Mvc\View\ViewInterface $view
* @return void
*/
public function initializeView(\TYPO3\Flow\Mvc\View\ViewInterface $view) {
$view->setPartialRootPath('../Packages/Application/Package.Key/Resources/Private/Partials');
}
P.S.: You can do the same with the LayoutRootPath for layouts and the TemplateRootPath for templates!
Regards,
Felix
> Message: 1
> Date: Tue, 4 Jun 2013 18:16:53 +0200
> From: "Stefan Bruggmann" <mail at newgen.ch>
> Subject: [Flow] Using Partials of other Packages
> To: flow at lists.typo3.org
> Message-ID: <mailman.1290.1370362625.570.flow at lists.typo3.org>
> Content-Type: text/plain;charset=iso-8859-1
>
> Hi All
>
> Is there a practical way to use partials of other packages?
>
> My plan is to separate my application to packages like NG.User (with basic
> profile functionalities), NG.Media (with photos, galleries, ..) etc. And
> the User package of course needs the Actions/Views/Partials of the Media
> package.
>
> Regards,
> Stefan
More information about the Flow
mailing list