[TYPO3-mvc] Fluid link ViewHelper - Dynamic array indexes

Christian Kuhn lolli at schwarzbu.ch
Wed May 11 17:10:42 CEST 2011


Hey,


I need to create a link that looks like this:

index.php?id=23&tx_myext_pi1[42]=somevalue

The '42' is not static, but an object id, thus dynamically generated.

I've tried several things and combinations, like this one (T3 4.5):
<f:uri.page
	pageUid="{conf.targetPid}"
	additionalParams="{
		tx_myext_pi1: {
			{item.uid}: 'somevalue'
		}
	}"
/>

As soon as {item:uid} is no simple string, I get exception '#1237900529: 
The argument "additionalParams" was registered with type "array", but is 
of type "string" in view helper "Tx_Fluid_ViewHelpers_Uri_PageViewHelper"'

Is there any way to achieve this? If not, where do I have to fiddle and 
which hacks are possible, maybe in an own view helper to get this done?

BTW: I know that I shouldn't do this at all, and transfer those 
parameters differently in the first place, but at the moment I can not 
solve this in the project.


Regards
Christian


More information about the TYPO3-project-typo3v4mvc mailing list