[Zope-dev] DTMLOverride

R. David Murray bitz@bitdance.com
Sun, 8 Apr 2001 19:44:36 -0400 (EDT)


I came across a need to modify a couple DTML Methods of a Product I was
using.  (It's my own product, but ignore that for now <grin>).  I didn't
want to modify the code of the product, because then I'd loose changes
if I upgraded the product.  First I just wrote a little product whose
init method went in an repointed the appropriate methods to new DTMLFile
objects.  But that doesn't work with Refresh.  So instead I wrote
a little product that modifies the __init__ method of ClassicHTMLFile
to check a configuration file to see if there is an alternate source
specified.

This is a proof-of-concept thing, as I'm not sure how useful such
a facility is (I have a use for it in mind with regards to EMarket,
but I haven't tried it out yet to see if it's really a good way to
reach my goal there).  So comments of the type: "cool idea",
"terrible idea" (and why), are welcome.

The product is at http://www.zope.org/Members/rdmurray/DTMLOverride

--RDM