Re: [Zope] How to catch URL in DTMLDocuments/Methods

2000-06-07 Thread Evan Simpson

- Original Message -
From: Ian Sparks [EMAIL PROTECTED]
 The conceptual problem I have is that DTMLMethods/Documents don't have a
 parameters tag like SQLMethods do, so I don't see how I can "trap" parts
of
 the URL like SQLMethods do and use them internally in my Method/Document.

There isn't an automatic way to do this; SQLMethods are specially written to
be traversable.  There are three (fairly complex) ways to do this that I can
think of:

1.  Subclass DTMLDocument and mix in the class SQLMethods use for
traversability.  Probably hard.

2.  Use a PythonMethod, and make one of its parameters 'traverse_subpath'.
Then you can traverse through this PythonMethod and use the parameter to do
what you want.  Not bad, but you need to know PythonMethods.

3.  Use a SiteAccess Access Rule on the folder, having it check to see if
the next object to be traversed is your DTMLMethod.  If so (and if the next
name doesn't start with 'manage'!) remove the rest of the traversal path and
store it in a REQUEST variable.  Not too bad, but SiteAccess is fragile (it
doesn't work with Zope 2.2a).

Cheers,

Evan @ digicool  4-am


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] How to catch URL in DTMLDocuments/Methods

2000-06-07 Thread Chris Withers

Evan Simpson wrote:
 3.  Use a SiteAccess Access Rule on the folder, having it check to see if
 the next object to be traversed is your DTMLMethod.  If so (and if the next
 name doesn't start with 'manage'!) remove the rest of the traversal path and
 store it in a REQUEST variable.  Not too bad, but SiteAccess is fragile (it
 doesn't work with Zope 2.2a).

I was going to implement this as a seperate PathHandler product for Zope
2.2 when the beta comes out.

someone has already sent me their alpha code for 2.1.x but it was
apparently unstable.

cheers,

Chris

PS: Evan is SiteAccess(or its replacement) going to ship as an
'official' product for Zope 2.2?

___
Zope maillist  -  [EMAIL PROTECTED]
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 )