[TYPO3-50-general] Beer3 - Array Syntax and View Helpers
Sebastian Kurfürst
sebastian at typo3.org
Tue Oct 28 16:49:34 CET 2008
Hello everybody,
some little status update of what I have been doing the last days:
Array Access
==========
First of all, I implemented array access syntax in Beer3, which
exactly matches JavaScript Object Syntax.
This means, the following now is possible:
<f3:link.to action="..." parameters="{parameter1: 'this is a string
parameter', parameter2: post.id, parameter3: {key: 'value'}}">...</
f3:link.to>
So, we only allow associative arrays at this place. The entry
delimiter is "," and the key/value delimiter is ":".
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.
This means that I think the language is now functionally complete. The
"short-hand view helper" syntax is not yet implemented, but that's
just syntactic sugar (as you can always write the tag-based view
helper syntax).
View Helpers
==========
I tried to look onto some other projects (namely grails) and wanted to
figure out what view helpers we might need as a basis. I thus talked
to Ingmar and Ernesto, and together we have made the list you can find
at http://forge.typo3.org/wiki/package-beer3/View_Helpers
It would be really great if you read over these things and tell me if
something is missing, the syntax is confusing, or you would prefer one
variant over the other (<f3:loop...> vs <f3:for...> as an example).
Besides, I think the view helpers need to be implemented quite soon
(and caching, eclipse autocompletion, ...) - is there anybody here who
would like to help programming the templating engine with me? I think
now it's the right time to form a small team around it, so it's not
just me implementing everything.
So, I really need your input and help again :-)
Greets,
Sebastian
--
Gimme five!
More information about the TYPO3-project-5_0-general
mailing list