[FLOW3-general] Community-backed HTML object markup
Adrian Föder
afoeder at live.de
Fri Dec 2 09:58:13 CET 2011
Hi community,
during coding, very often I thought of the fact that I'd really like to
have some reliable rules to markup the representation of a list, single
view etc., (i.e. the *action*), and the model and field which is
displayed; also taking into acount nested displays.
So, just as an example:
<div class="listAction customer">
<f:for each="{customers}" as="customer">
<div class="customer-record">
<div class="customer-field field-prename">{customer.prename}</div>
<div class="customer-field field-surname">{customer.surname}</div>
<div class="customer-field field-projects">
<f:for each="{customer.projects}" as="project">
<div class="project-record"> ..... etc pp </div>
</f:for
</div>
</div>
</f:for>
</div>
Just an, as said, bad example, I'd like to see what your opinion is and
if you maybe already use or implement such thing.
I see multiple benefits in such an approach; there are bindings to the
real model behind and so debugging would be simpler; also the handling
of maybe module-based css's is better possible; and you can make sure
that a specific css class is not accidently used in another context.
And very often a specific display style of e.g. "projects" is used in
many contexts the same way; so to say: the projects list inside a
customer and the project list inside the Agenda view could be mostly the
same; and deviations of it can be made with an additional action class
selector...
What do you think?
Best,
adrian
More information about the FLOW3-general
mailing list