[TYPO3-mvc] Fluid ViewHelper Incubator

Simon Schaufelberger simonschaufi at jesus.de
Fri Jan 7 18:52:20 CET 2011


hi bastian,

> The same here: Just create an object that matches your domain and assign
> *that* to your view. Even if the domain in your case is very flexible,
> it's the better approach in my opinion.

you didn't get the point, there is NO model. For this extension, you 
don't need any model since everything is done in Typoscript.

> don't you think?

i think since this is a very specific requirement, i will just use your 
package ;)

Am 07.01.2011 17:34, schrieb Bastian Waidelich:
> Simon Schaufelberger wrote:
>
> Hi Simon,
>
>> what i cannot do is to take that min, max, avg and do something with it
>> in my model or controller since there is none ;) so i need to do all the
>> calculations in the fluid template.
>
> IMO whenever you're tempted to do calculations or extensive grouping
> within your template, you should think about an intermediate model that
> encapsulates that aggregate functionality.
> E.g. if you think about a shop: you wouldn't want to iterate through the
> articles and calculate the total in your view. Instead you might create
> a "Basket" model that contains the articles and can do those
> calculations for you.
>
>> example: i calculate the max time of all items in the list in my
>> typoscript and then assign it to the view. in the view i want to
>> multiply the time with a price that comes from another column.
>
> The same here: Just create an object that matches your domain and assign
> *that* to your view. Even if the domain in your case is very flexible,
> it's the better approach in my opinion.
>
> Sometimes it's probably still the faster or pragmatic way to do some
> calculations in the template.. But in that case you're free to install
> the incubator extension or provide the needed view helpers with your
> extension. don't you think?
>
> Best,
> Bastian

-- 
Regards, Schaufi


More information about the TYPO3-project-typo3v4mvc mailing list