[FLOW3-general] More than one controller
Christian Müller
christian.mueller at typo3.org
Sun Mar 3 16:01:27 CET 2013
Hi Stephen,
On 03.03.13 12:37, Stephen Bungert wrote:
> How do you render more than one controller?
>
> I have an product controller and a category controller.
you can solve this in different ways depending on how flexible you need
it to be.
>
> I want both on the same page, os that the categories can act as a
> filter for the products.
>
> Do I have to create an instance of my category repository in my
> products controller, collect the categories and pass them to my
> product's view to be rendered?
That can be one possible solution. Also creating subrequests would be a
way. Depending on the overall application it could make sense to create
an abstract controller and set the categories in the initializeView
method of that abstract controller so it is available in all actions.
>
> Or is there some kind fluid tag for this?
No, but you could maybe create a widget for the categories.
Cheers,
Christian
--
Christian Mueller
TYPO3 Core Team
TYPO3 .... inspiring people to share!
Get involved: typo3.org
More information about the FLOW3-general
mailing list