[TYPO3-50-general] [TYPO3-team-core-v5] Templating Engine

Bastian Waidelich bastian at typo3.org
Fri Oct 24 13:41:36 CEST 2008


Christopher Hlubek wrote:

Hi Christopher,


> I talked with Sebastian about that two days ago and I proposed
> some syntax like:
> 
> <f3:link controller="posts" action="editPost"
> requestParameters="{postId: post.id, blogId: blog.id}">Edit
> post</f3:link>

We talked about that syntax too. Actually I'd prefer s.th. like:

<f3:link.to action="edit" parameters.post={post.id}">edit</f3:link.to>

but most probably that won't be possible because tag/attribute names 
have to be fixed. So, I really like your solution as a compromise.


> So basically it should be possible to define an array / associative
> array in braces.

Well, probably _only_ associative arrays. It won't be possible to tell 
apart objects and non-associative arrays with only one element otherwise:

if that is possible:
<f3:for each="{1,2,3}" as="number">

that should be possible too:
<f3:for each="{1}" as="number">

we could only achieve this by imposing yet another syntax for 
collections (like <f3:for each="[1,2,3]" as="number">). But that makes 
it more complex and you'd have to escape all square brackets in your 
templates..

So, we might go for associative arrays only.
You could still achieve the above:
<f3:for each="{1:1, 2:2, 3:3}" as "number">

Admittedly, not very beautiful, but you probably did something wrong in 
the first place if you end up with that anyways ;)

Bastian


More information about the TYPO3-project-5_0-general mailing list