Re: [Zope] Document parameters as part of a URL

2006-06-08 Thread Chris Withers
Peter Bengtsson wrote: Well, you could maybe create a new type of DTML Method called Clear DTML Method which would in principle look something like this: from zope.somewhere import DTMLMethod class ClearDTMLMethod(DTMLMethod): meta_type = Clear + DTMLMethod.meta_type def

[Zope] Document parameters as part of a URL

2006-06-07 Thread Andrew Hedges
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.

Re: [Zope] Document parameters as part of a URL

2006-06-07 Thread Peter Bengtsson
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

Re: [Zope] Document parameters as part of a URL

2006-06-07 Thread Andrew Hedges
Peter, That definitely looks promising. I've tried a couple of ways, but I can't make it so this applies to all DTML Methods. Any ideas? -Andrew On Jun 7, 2006, at 6/7/2006 4:10 PMMDT, Peter Bengtsson wrote: I much prefer to use __before_publishing_traverse__. Eg. class

Re: [Zope] Document parameters as part of a URL

2006-06-07 Thread Peter Bengtsson
Well, you could maybe create a new type of DTML Method called Clear DTML Method which would in principle look something like this: from zope.somewhere import DTMLMethod class ClearDTMLMethod(DTMLMethod): meta_type = Clear + DTMLMethod.meta_type def __before_publishing_traverse__(...):