[Zope] External <-> DTML Methods

Tom Deprez tom.deprez@uz.kuleuven.ac.be
Mon, 28 Feb 2000 17:00:20 +0100


Hi all,

At 16:59 28/02/2000 +0100, Rik Hoekstra wrote:
>Hi,
>
>Shalabh helped me a lot further, he gave me an external method which helps
>me on the way, however I would like to know if it's possible to write this
>in a DTML-method. If this isn't possible, then why isn't this possible?
>
>Here is the external method (placed in the Methods view of a class)
>
>def manage_afterAdd(self,item,container):
>    item.myparent=container.id
>    return
>
>Is it possible to write this in DTML?
>
>No, not directly as far as I know. But refering to you first question: is
>there any reason why a
>
><from the top of my head>
>
><dtml-call "REQUEST.set('parent', container.id)">
><dtml-call "manage_changeProperties(REQUEST)">
>
>after you created the instance would not work? I do this all the time. Or do
>I misunderstand your question?

Yup, that works, I found the solution a little bit after I sended the
question. This was my problem (dumb!) :

<dtml-call "manage_changeProperties(REQUEST)">
<dtml-call "REQUEST.set('parent', container.id)">

Tom.