I much prefer to use __before_publishing_traverse__.
Eg.
class MyProduct(Something):
def __before_publishing_traverse__(self, object, REQUEST):
""" sort things out before publising object """
stack = REQUEST['TraversalRequestNameStack']
if len(stack)==2 and stack[0]=='members' and stack[1].isdigit():
REQUEST.set('member_id', stack[1])
stack.remove(stack[1])
That's my opinion.
On 6/7/06, Andrew Hedges <[EMAIL PROTECTED]> wrote:
Just curious what people think of the technique described here:
http://www.zope.org/Members/petrvanblokland/parameters_in_url
This page is a few years old. Is there something built-in to more
recent versions of Zope that does this already? If there is, Google
has failed me on this one.
The context is that I'm working on a DTML (yeah, yeah ... I know)
application in Zope 2.9.2 and want to be able to build URLs like this:
http://server.domain/members/44
...where members is a DTML Method and 44 is a user_id I could do
things with, like call a ZSQL method. I'd prefer that members is a
DTML Method and not a Python script or ZSQL Method.
Thanks in advance for any insights!
-Andrew
-----
Andrew Hedges, [EMAIL PROTECTED]
http://clearwired.com/
_______________________________________________
Zope maillist - [email protected]
http://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )
--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
_______________________________________________
Zope maillist - [email protected]
http://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )