[TYPO3-mvc] more than one template for one action?

Xavier Perseguers typo3 at perseguers.ch
Sat Jul 25 11:20:44 CEST 2009


Hi,

>> there are two things which are on our to-do list but which still need 
>> further refinement:
>>
>> a) Implementation of a (v4 only) ViewHelper which outputs stuff inside 
>> the head-element of the page. Example:
>> <f:headerData>... this is outputted in the header</f:headerData>

What might be good is to create a View ending with .js and another in 
.html and then in Controller be able to instruct it that the view to be 
used for header is the .js and the other is the .html (or simply skip 
this later as it is already done automatically).

Didn't test but it might help IDE to show the .js with highlighted 
syntax while allowing us to use Fluid there.

In fact, I guess it would be very very cool to be able to instruct the 
controller to use a set of Views in sequence. Something like:

$this->headerViews->add(/path/to/myview.js);
$this->headerViews->add(/path/to/myotherview.html);

and the same for footerViews. I guess the "action" view itself should be 
kept as this as I don't really see the point complicating the logic there.

>> b) Implementation of a way for ViewHelpers so they can add stuff to 
>> HeaderData.
>>
>> Currently, they will have to do it "by hand" using TSFE, etc, but we 
>> want to have this nicely encapsulated (through proboably not for 4.3).
>>
>> The idea is to have a new facet which you can implement, where you 
>> have to write a method returning the header data.
>>
>> Anyway, I think currently that none of the above will happen for 4.3, 
>> as the schedule is quite tight.
> 
> Don't be that pessimistic :) I already wrote a patch for a header/footer 
> class, so that we are near by doing such. In our extension we have a 
> special ActionController doing this, so there is not much missing.

Exactly, did not test a view ending in .js for instance to see if mixing 
Fluid stuff inside is OK for the IDE but this would be quite easy to add 
this to Extbase with Steffen's patch.

> Have a look to our ExtJS Extension on forge.

Once again the url such that there is no excuse for anybody :-)
http://forge.typo3.org/projects/show/extension-mvc_extjs_samples

-- 
Xavier Perseguers
http://xavier.perseguers.ch/en

One contribution a day keeps the fork away


More information about the TYPO3-project-typo3v4mvc mailing list