Augmenting aquired DTML-Method's in subfolders
Hi all. I've found a question like this in the Archives but no answer :-( The Problem: At the root-level I definde standard_html_header (and some other's). In a subfolder I now would like to extend the definition of standard_html_header, that is, I would like to write something like <!--#(get aquired version of standard_html_header)--> (some DTML-Code) Now, how do I write '<!--#(get acquired version of standard_html_header)-->'? At the moment I use <!--with "PARENTS[-1]"--><!--#var standard_html_header--><!--#/with--> But I don't like this construct. It work's as long as the acquired Version is the one in the root document, but what, if I have already augmented standard_html_header in some other PARENT? Hmm... I would like some construct opposite to 'with', like 'temporarily pop the topmost n Namespaces' or something like this. This would be handy in other situations to. Any possibility? Other construct's I'd like are things like 'Pop me to the place, where <foo> was acquired from', or 'give me the PARENT, where <foo> was acquired from'. How do I answer questions like this effectively. I'm pretty new to Zope, so maybe there's a better Zope-isch solution to my problem, but ... Stefan.
On 14 Jun 1999, Stefan Bund wrote:
pretty new to Zope, so maybe there's a better Zope-isch solution to my problem, but ...
You might try adding the following in your top-most standard_html_header (assuming you standard_html_header is a DTML Method) <!--# if augmented_header --> <!--# var augmented_header --> <!--# /if--> Then just add a Document or even a property with id augmented_header in your folder of interest. FYI <!--# var "_.render(mydoc)"--> will render mydoc in the context of its containing folder. Pavlos
pavlos@gaaros.msrc.sunysb.edu (Pavlos Christoforou) writes:
On 14 Jun 1999, Stefan Bund wrote:
pretty new to Zope, so maybe there's a better Zope-isch solution to my problem, but ...
You might try adding the following in your top-most standard_html_header (assuming you standard_html_header is a DTML Method)
<!--# if augmented_header --> <!--# var augmented_header --> <!--# /if-->
I thought about that to, but of course, than I can only augment once down the inheritance tree :-) Not that I really need a more general feature, but I'd like to see if it's possible and there are other circumstances, where getting at overwritten acquired Methods etc would be very usefull.
Then just add a Document or even a property with id augmented_header in your folder of interest.
FYI <!--# var "_.render(mydoc)"-->
will render mydoc in the context of its containing folder.
Interesting :-) Stefan.
participants (2)
-
Pavlos Christoforou -
Stefan Bund