[Zope] Context - how can I be here when I'm there

Andreas Jung lists at andreas-jung.com
Thu Aug 11 11:49:25 EDT 2005



--On 11. August 2005 11:42:05 -0400 Chris Matheson 
<chris at centralfrontenac.com> wrote:

> Hello all,
>
> First post.  I've read (past tense) tfm, but still don't know quite how
> to do this.
>
> I'm writing a Python script called by a zpt page.  How can I obtain the
> resource/object which was first called by the visitor to the site, from
> the python script.  I've tried context.PUBLISHED , but that is not quite
> what I want, as it gives more of a url style.  I'm tring to get something
> that I can compare to an objectValues() list.

'context' - as the name says - is the current object your dealing with.

If you call TTW /path/to/x/y/z/your_zpt then 'context' is the object behind 
the URL /path/to/x/y/z

-aj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20050811/a1f50716/attachment.bin


More information about the Zope mailing list