[TYPO3-mvc] Using ViewHelpers inside ViewHelpers?

Franz Koch typo3.RemoveForMessage at elements-net.de
Wed Jan 20 12:47:03 CET 2010


Hi,

> I have two plugins on my page. One is a category menu. The other is a
> product list. Both receive the active category, selected by the user.
> The menu displays a folded/unfolded hierarchical menu of the
> categories, and the product list displays all the products inside the
> active category.
>
> Is it possible to pass values to multiple plugins with one
> link.action? This was the main reason for me to create my own
> category.render ViewHelper with links including multiple plugin
> arguments.

In my current project I also have a category menu and a product list, 
but it's no big deal to have both react on the same piVar (speaking in 
v4 terms). As you have the category available when you're rendering your 
products, simply do this:

<f:link.action action="index" controller="Product" 
arguments="{category:category, product:product}">Foobar</f:link.action>

so when you're also passing the category as argument you shouldn't have 
any problems in handling it with your menuController (or however you 
build your category menu - I'm using a HMENU and auserFunc as 
itemProcArrayFunc and call my controller from inside the userFunc as a 
direct call didn't work out).


-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list