[Zope] python: calling DTML-methods without quoting

Chris chris-zopemailing at gmx.de
Tue Oct 4 11:59:44 EDT 2005


Hi Peter,

>><dtml-with "somePath.someDTML">
>>   <dtml-var foo>
>></dtml-with>
> 
> Now I'm very confused. What the heck is "someDTML" and what is "foo".
> I thought "someDTML" was a DTML Method/Document. Then what is foo?

Sorry, my fault. This should read
<dtml-with "somePath">
    <dtml-var someDTML>
</dtml-with>

> I could be wrong but it seems your DTML usage is flawed. Then yes,
> you'll have to write some regular expression scripts that recodes them
> to call templates the correct way.

This would be no problem. However I need zope to do this automatically 
so I don't have to change the dtml-var calls in the customer's code. So 
my thought is to alter the __call__ method of DTMLMethod.py which is 
kind of ugly in case I want to update Zope later on.

> PS. Do you need convincing that Page Templates are better than DTML
> for HTML stuff?

I KNOW that :-) I don't use DTML myself. As I said I try to get a 
customer's stuff run on a curent version of zope. I would love to clean 
up his stuff and convert is to tal.

Regards
Chris


More information about the Zope mailing list