[TYPO3-mvc] get controller context inside template

Bastian Waidelich bastian at typo3.org
Sat Oct 24 12:05:35 CEST 2009


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