[TYPO3-mvc] view renderer ignores action argument

Thomas Allmer at at delusionworld.com
Thu Oct 13 11:10:58 CEST 2011


On 13.10.2011 03:56, g4-lisz at tonarchiv.ch wrote:
> On 10/13/2011 02:45 AM, Bastian Waidelich wrote:
>> g4-lisz at tonarchiv.ch wrote:
>>
>> Hi G4 Lisz ;)
>>
>>> if ($demand->getSpecialDemands() !== NULL) {
>>> $this->request->setControllerActionName('resultsExtended');
>>
>> better don't mess with that non-api methods of the request. That can
>> have severe side effects.
>> Instead you should make use of Fluid partials and layouts where
>> possible. And if that's not sufficient have a look at the VariantView
>> from Peter:
>> http://forge.typo3.org/projects/typo3v4-mvc/wiki/How_to_change_the_template_for_one_plugin_instance
>>
>>
>> Best,
>> Bastian
>>
> But it was so simple and it works nicely! ;)
>
> I wonder why there is no setTemplateFilename() method. And
> getTemplateSource($action) is protected so one had to re-invent the
> rootpath-magic.
>
> I don not really understand what you mean wiht "non-api method"...

a more generic approach to this is using something like this

$view->setTemplatePathAndFilename($this->view->getTemplateRootPath() . 
'Email/TipAFriend.html');

but getTemplateRootPath is not public either :p

pls see this issue and vote it up :)

http://forge.typo3.org/issues/29303

cheers
-- 
+---------------------------------+-----------------------------------+
| Thomas Allmer                   |   http://www.delusionworld.com    |
| E-mail: at at delusionworld.com    |   phone: +43 699 16217064         |
+---------------------------------+-----------------------------------+


More information about the TYPO3-project-typo3v4mvc mailing list