-----Original Message----- From: Tony McDonald [mailto:tony.mcdonald@ncl.ac.uk] Sent: vrijdag 21 mei 1999 11:34 To: hoekstra@fsw.LeidenUniv.nl; Zope@zope.org Subject: RE: [Zope] getting <!-- --> sections to 'render' from an externalmethod...
I want the <!--#var conference--> DTML to be left alone by the make_html external method so that Zope can get given it and then do all its good stuff.
Thanks for the reply,
Um, I don't know if I understand it quite right.
If the question was concerning what the method should return, then you could either pass 'REQUEST' or 'self' (Depending on where the conference variable is:in REQUEST, in a Folder) to you method and have it return something like
'For the following exercise, use the conferencing system. %s' %REQUEST['conference'], tagtype='text'
Would this allow Zope to 'render' the returned value from the external method (eg '...use the conferencing system <!--#var conference--> ...') so that the #var is expanded?
Yes, (though you perhaps it depends on how you call a variable - it does in DTML, don't know about External Methods)
If the question was concerning the way to pass a variable to an external method, then the problem is that you can't use DTML inside an expression. Change it to something like: 'For the following exercise, use the conferencing system. %s' %conference, tagtype='text'
I see what you mean. I don't want to pass a variable to the external method, I want the external method to put a 'wrapper' around the content I send it (in this case HTML) and then pass that back to the Zope system which will then do any further substitutions/acquisitions etc. based upon any DTML that *may* be returned.
As far as I know, External Methods and DTML methods are on the same ZOpe level, that is: they get called at the same time. The bad consequence is you can't return values from an External Method and then have them processed by Zope. The good consequence is you can do everything from an External Method that you can do from DTML (and much more). For instance you can call the DTML you would otherwise have included in the document. Rik