RE: [Zope] Indirect addressing
From: Ragnar Beer [mailto:[EMAIL PROTECTED]] + 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. Something like this ought to work: dtml-var "objectValues('DTML Method')[my_external_method()]" This is a no-no, as you cannot have nested dtml: dtml-var dtml-varmy_external_method Regards Max M ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Indirect addressing
On Thu, 7 Dec 2000, Ragnar Beer wrote: This would logically be handled with "dtml-var dtml-var my_external_method" in index_html but this doesn't work. Don't write DTML inside DTML. Inside DTML tag use Python: dtml-var "_[my_external_method()]" Oleg. Oleg Broytmann http://www.zope.org/Members/phd/ [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Indirect addressing
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 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )