[TYPO3-mvc] get controller context inside template

Fernando Arconada falcifer2001 at yahoo.es
Sat Oct 24 14:41:42 CEST 2009


You said:
>If you want to reuse a partial with different actions, you could write:
> <f:render partial="foo" arguments="{action: 'bar'}" /> and
> <f:link.action action="{action}">link</f:link.action> in the partial.

But i'm using the partian inside the layout not in the sections, so whith 
you way i'll have to modify every template to pass the action name. I 
think that it isnt very clean

Other ideas?

Thanks

Mr. Routing :-)
El Sat, 24 Oct 2009 12:05:35 +0200, Bastian Waidelich escribió:

> Sebastian Kurfürst wrote:
> 
> Hi,
> 
>> If this does not work, I think this is a bug which should be fixed.
>> @Bastian aka Mr Routing, what do you think? :-)
> 
> Mr Routing thinks... it's a feature, not a bug ;) If you have:
> <f:link.action controller="otherController">link</f:link.action> you'd
> expect the link to point to the configured default action of that
> controller.
> Changing that behavior for the current controller would be confusing
> IMO, so:
> <f:link.action>link</f:link.action>
> points to the default action of the current controller.
> 
> If you want to reuse a partial with different actions, you could write:
> <f:render partial="foo" arguments="{action: 'bar'}" /> and
> <f:link.action action="{action}">link</f:link.action> in the partial.
> 
> btw: There already exists an issue for this @ forge:
> http://forge.typo3.org/issues/show/4207
> 
> All the best and enjoy the weekend
> Bastian





More information about the TYPO3-project-typo3v4mvc mailing list