[Zope] Passing Variables (was: RE: [Zope] finding that variable...)
Jens Vagelpohl
tommymi@concentric.net
Wed, 14 Jul 1999 13:45:09 -0400
hi mike & fellow zopistas,
yes, i do indeed have more than one DTML method in the respective folder. i
did start thinking about what i was doing (having a DTML method render the
whole page) and i thought that this doesn't really make that much sense. so
i created a dtml *document* which accesses that method. however, i ran into
trouble passing the variables i need.
passing variables from methods to documents and back and how exactly this is
done syntactically and how, after passing them, i am supposed to refer to
them in the right way is still a little voodoo to me. some things works
great in one application, but in a seemingly similar situation it doesn't.
maybe this would ge a great idea for a little Zope HOWTO, something to
complement the documentation on the Zope website (hi pam! ;)
here's some of my questions regarding passing of variables, please keep in
mind that i am working in a setup with several methods and documents in a
directory, obviously an easy way would be to make sure there is just one
method per folder and to make the variables into folder properties:
* how do i correctly pass variables from a *document* to another *document*?
and is there an elegant way to avoid calling the document with the whole
rat's tail of arguments attached (as in "a
href="doc2?var1=x&var2=y&var3=z..." etc ad infinitum)
* how do i correctly pass a variable into a DTML *method* from a *document*?
* how do i correctly refer to a passed-in variable in *documents* and
*methods*?
* what is the real difference between calling a method via <!--#call
"myMethod"--> and via <!--#var "MyMethod"--> and which of the two is the
correct way to do it (especially when it comes to passing arguments in that
call)?
maybe my confusion comes from not having any python background... :(
Jens Vagelpohl
> -----Original Message-----
> From: Michael Bernstein [mailto:mbernstein@profitscape.net]
> Well, do you have more than one DTML Method per Folder? if not,
> you can attach a
> 'helpfile' property to the folder, and the Method will acquire
> it, making it
> display exactly the same as the Documents do.
>
> HTH,
>
> Michael Bernstein.
>