[TYPO3-mvc] view renderer ignores action argument
Peter Niederlag
typo3-list at niekom.de
Tue Oct 18 13:09:44 CEST 2011
Hello Claus,
Am 18.10.2011 11:07, schrieb Claus Due:
> On Oct 18, 2011, at 10:47 AM, Peter Niederlag wrote:
>
>> as "setTemplateFileName('Foobar')" is mostly what the developer
>> would like to do. ;)
>
> I have never seen anyone asking for a way to do the above, nor have I
> ever needed to do it. Neither has anyone else that I know of… before
> now :)
I have seen this numerous(!) times. For example when you have a
plugin/Controller/action but want different layouts(templates), for
example based on the column(normal/left/right). How do you solve that?
Also see where this thread initially started....
Till overriding $this->request->setControllerActionName('resultsExtended');
like it seems only to display a different template based on some criteria...
> The only place I can imagine this making sense is when used as a
> standalone template (more the exception than the rule)?
>
> Are you sure this is not just an idiosyncrasy? IMHO
> setTemplatePathAndFilename() is the way to achieve the above if you
> really must override the standard behavior.
Not really, because the you loose the ability to change the rootpath by
TS. As soon as you use setTemplatePathAndFilename() IMO the possibility
to change the rootPath via TS is lost.
There are times when you just want to override the 1to1 mapping of
actionName=TemplateName and just want to adopt the TemplateName while
keeping the option to change the template by overriding the rootPath and
copying the template there.
I have "my solution" now with layoutVariants, but having a simple
way/API to influence just the TemplateName (without the path!) would IMO
be something useful.
Greets,
Peter
--
Peter Niederlag
http://www.niekom.de * TYPO3 & EDV Dienstleistungen *
More information about the TYPO3-project-typo3v4mvc
mailing list