[Zope] (no subject)
Chris McDonough
chrism@digicool.com
Thu, 13 Jul 2000 15:00:03 -0400
This is a job for __bobo_traverse__ (yes, I know, unlikely name, but
what has now become Zope used to be named Bobo).
Without using __bobo_traverse__, which is defined as a method on the
object which you access via traversal, you can't easily use "extra" URL
elements as parameters to pass to the object.
An sample __bobo_traverse__ method:
def __bobo_traverse__(self, REQUEST, name):
""" 'name' here is the remainder of the URL """
return self._data[name]
It might be easier in your case if you're not used to python to
construct your own Zope objects in which you can place a
__bobo_traverse__ method to just use query string arguments instead,
which are available through the REQUEST object.
> -----Original Message-----
> From: Leichtman, David J [mailto:code@ou.edu]
> Sent: Thursday, July 13, 2000 2:27 PM
> To: 'zope@zope.org'
> Subject: [Zope] (no subject)
>
>
> I've previously been a Perl programmer. I did a lot of stuff
> where I would
> have multiple links with different options.
> Ex.
>
> <a href="/path/script.pl/1234">1234</a><br>
> <a href="/path/script.pl/2345">2345</a><br>
>
> Then, in script.pl, I would pick up the extra info on the
> other side from
> $PATH_INFO.
>
> The problem in Zope is that there is no "end" to the address.
> Serving from
> Apache, it knows that the .pl extension is the end of the
> path. If there's a
> '/' and more after it, it will push it to PATH_INFO. So how
> do you do this
> in Zope? Because it's object names instead of paths in the
> request, how do
> you send optional, additional info through the request as above?
>
> I know there has to be a way to easily do this, I just can't
> figure it out.
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>