[ZPT] Editing Expanded Macros
Michael R. Bernstein
webmaven@lvcm.com
20 Oct 2001 14:15:45 -0700
On Fri, 2001-10-19 at 14:32, Dieter Maurer wrote:
> Michael R. Bernstein writes:
> > On Tue, 2001-10-16 at 09:27, Michael R. Bernstein wrote:
> > > In other words, I'd like to be able to add a metal:edit-expanded="allow"
> > > statement to the macro definition in order to facilitate rapid
> > > development (edits to the expanded macro are applied to the macro
> > > definition), and then remove the statement when I want to lock the macro
> > > down.
>
> I think this is dangerous, as the macro can be used in different
> environments.
This *IS* dangerous, which is why I clearly say that the statement would
need to be removed from the macro definition after the initial
prototyping stage.
This feature would clearly be most useful to people who are doing both
the design and programming themselves, but the Zope community includes
many such people. This is definitely a 'power user' rapid prototyping
feature.
> As I understand it, the macro is embedded in a complete
> page template. Design it there until you are satisfied.
> Then use it unchanged whereever you want to.
When I'm designing an overall page layout, I find that I need to
evaluate it in different contexts and tweak it in different ways
depending on the specifics of the page. All page layouts end up being
compromises between the needs of the different contexts in which the
layout is used. Developing consistent navigation systems for sites seems
to be the hardest balancing act.
It's annoying to have to constantly switch back and forth between the
context that I am currently evaluating and the 'master' macro template
in order to edit it. There is little productivity improvement over using
DTML in this case.
Being able to edit the expanded macro and have those changes applied to
the macro definition would save a *lot* of time and annoyance, and make
it easier and quicker to find the balance between the different
contexts' needs.
I want to emphasize again that I would *not* advocate that this
statement be left on the macro beyond the prototyping stage, or that it
be used in situations where one person is doing the design, and another
does the programming.
However, Zope is used by many people who are a 'one-man-show' so to
speak, and making their life easier only makes sense, especially as this
will not compromise any of ZPT's goals for other audiences.
Sincerely,
Michael Bernstein.