[TYPO3-50-general] Beer3 - Array Syntax and View Helpers
Sebastian Kurfürst
sebastian at typo3.org
Thu Oct 30 19:47:40 CET 2008
Hi Daniel,
>> As values, in case you want to write a string parameter, you have to
>> quote it. There is _no_ parsing inside the string parameter, so you
>> cannot use a variable inside a string parameter. (Example:
>> {parameter1:
>> 'this is a string with nothing parsed inside'})
>> In case you want to output the contents of a variable there, use the
>> following: {parameter2: post.id} - so this is as it is in JS.
>> You can as well use arrays as values, so the nesting of arrays inside
>> each other is easily possible.
>
> What about accessing methods of the presentationmodel and/or the view
> itself?
I don't fully understand what "methods of the presentation model" are
in this context. Could you clarify this? :-)
Concerning access to view methods: I'd rather forbid this at the
moment, as I think it is more easy and clean to write custom view
helpers for this (which is really easy to do anyways). However, after
we started playing around with the templating when it is working, if
we still notice that we need such a functionality, we can think about
implementing it.
> furthermore support for submodels vie method calls like
> (pseodosyntax):
>
> <f3:foreach presentationmodel.getListItems as listitem>
> listitem.displaySpecialLabel
> </f3>
Well, not fully - but as how I understood it the following is
equivalent:
<f3:for each="{blog.listItems}" as="listItem">
{listItem.specialLabel}
</f3:for>
The {...} syntax is actually an object-traversal syntax currently
taking getters and public properties into account.
I think that's what you wanted, right?
> A default view helper "languagemarker" is missing imho.
Good point. We'll still think about localization.
Greets,
Sebastian
More information about the TYPO3-project-5_0-general
mailing list