[Zope] dtml methods and namespace

David bluepaul at earthlink.net
Thu Mar 9 12:39:59 EST 2006


Luca Dall'Olio wrote:

> Hi to everybody,
>
> I have a simple dtml-method "assignment-action" that is called upon a 
> form post.
> Depending on the form request data, a <dtml-if> chooses between one of 
> two dtml-documents : "assigment-success" and "assignment-failure" :
>
> <dtml-if  "iscorrect()">
> <dtml-var assignment-success>
> <dtml-else>
> <dtml-var assignment-failure>
> </dtml-if>
>
> My trouble is that neither the "assignment-success" nor the 
> "assignment-failure" dtml-documents seem to be pushed on the namespace 
> : inside them title_or_id references data from their caller, this() 
> and PARENTS do not evaluate right... is there a smarter way to call a 
> dtml-document inside a dtml-method (), so that it it pushed on the 
> namespace stack? Should I use somehow the <dtml-with> tag?
>
> I understand that page templates would be way easier and cleaner, but 
> I would like to complete this project and then try them out in the 
> next one...
>
> thank you in advance,
> Luca
>
Luca,

Not sure exactly whats going on there ... but  there are significant 
differences between dtml methods and dtml documents and how they view 
identity. 

David



More information about the Zope mailing list