[Zope] Acquisition from a DTML method in a subdirectory

Troy Farrell troy at entheossoft.com
Mon Mar 8 10:13:42 EST 2004


The short reason that this works is that using expr="some_method()" calls that 
method without passing the namespace to it.  The underscore variable ("_") is 
the namespace variable (or something like that.)  If you don't use expr="", you 
can use name="" naming the function without () to accomplish the same thing. 
Note that you cannot (to my knowledge) do name="B.Bdtml_method" because the "B." 
portion of that is an expression, hence Chris mentionning <dtml-with B>

Troy

Jim Anderson wrote:
> 
> Troy,
> 
> Thank you for the reply. This fixed my problem. It would be interesting
> to get an explanation on the arguements and why they work.
> 
> Jim
> 
> 
> Troy Farrell wrote:
> 
>> Try changing Adtml_doc to
>>
>>   <dtml-var expr="B.Bdtml_method(_.None,_)">
>>
>> If that solves the problem, a zopista greater than I can explain why.  
>> If not, all I can say is that I don't use DTML any more :(
>>
>> Troy



More information about the Zope mailing list