[Zope] Indirect addressing

Dieter Maurer dieter@handshake.de
Thu, 7 Dec 2000 21:50:27 +0100 (CET)


Ragnar Beer writes:
 > Howdy Zopistas!
 > I have a directory structure like this:
 > + myfolder
 > 	index_html
 > 	my_external_method
 > 	dtml_method_1
 > 	dtml_method_2
 > 	...
 > 
 > In index_html I want to include either dtml_method_1 or 
 > dtml_method_2, ... (one method for every week of year). 
 > my_external_method tells me which dtml_method to include.
 > This would logically be handled with "<dtml-var <dtml-var 
 > my_external_method>>" in index_html but this doesn't work.
If your external method returns the object itself
(and not its name), then you can use:

     <dtml-let method=my_external_method>
       <dtml-var method>
     </dtml-let>

or, if your method needs parameters

     <dtml-let method="my_external_method(parameters...)">
       <dtml-var method>
     </dtml-let>


Dieter