It would be what the ForAttributeParser already is, except it would allow expression modifiers and keys/indexes. Ultimately this would replace the for attribute in some future release where I feel like breaking backwards compatibility.
A simple example:
<div data-htmt-foreach="posts as post">
...
</div>
With key/index:
<div data-htmt-foreach="posts as key, post">
...
</div>
And with modifiers:
<div data-htmt-foreach="posts | reversed as key, post">
...
</div>
It would be what the
ForAttributeParser
already is, except it would allow expression modifiers and keys/indexes. Ultimately this would replace thefor
attribute in some future release where I feel like breaking backwards compatibility.A simple example:
With key/index:
And with modifiers: