[Zope] with a variable

Eric Walstad eric@walstads.net
Fri, 12 Jan 2001 12:26:34 -0800


//  I want to get some properties for a zclass instance after being
//  passed its
//  id in a variable. In these tests I have been defining the varible in the
//  code, in the final case it will be passed through the url.
//
//  Using the id directly as above works fine, it writes the
//  attribute to the
//  page.
//
//  Thanks for any help,
//
//  Josh On
Hi Josh,
I'm kinda new to this stuff, but I think I am doing something similar to
what you need.
I have a DTML method that grabs a ZCLass object's id from the query string
and uses it to
gain access to that ZCLass object.  It looks like I'm generating the id's
the same way
you are (not that that matters...)  I do it like this:
The URLs look something like this:
addUserToEvent?977952867
where 977952867 is the id of the ZClass object I want to work with

and the "addUserToEvent" method has this in it:
		<dtml-with "_.getitem(QUERY_STRING)">

			...Do stuff with the ZClass reference here...

		</dtml-with>

I hope that helps.

Eric.