[Zope-dev] Nesting Forms
Ross Boylan
RossBoylan@stanfordalumni.org
Wed, 17 Jul 2002 14:50:51 -0700
I have a product with a number of classes that have subclasses. It
seems natural to make the screens for the subclasses by extending
those of the superclass. Can anyone suggest a good way to do that?
The naive approach is that I have a manage_edit_A.dtml that gives a
management screen for A. If B subclasses A, I create
manage_edit_B.dtml by copying from the first file and then fiddling
with it. Obviously, it would be desirable for a change in A to only
require changing a single file.
I would prefer a more elegant approach. Perhaps I can define some
method in A that the dtml will reference, and then B can override the
method to add some extra stuff (the method would return a DTML
snippet).
First, I'm not exactly sure how to pick up the method from the DTML.
Second, I'm not sure if this is the best solution. For one thing, I
would prefer to keep all my dtml in separate files, rather than
defining it into my methods.
Any suggestions?
P.S. I'd like to thank Toby Dickenson, Casey Duncan, and R. David
Murray for their very helpful responses to my previous question.