Hi all I just created a 'Traversable DTML Document' product. You can get it here: http://www.zope.org/Members/shalabh/TraversableDTMLDoc/ It is a ZClass product based on the TraversableMixin (which you'll have to install anyway) to be found here: http://www.zope.org/Members/shalabh/TraversableMixin/ And yes, you can use the mixin to create any ZClass that is 'traversable'. For example create a new ZClass with DTMLMethod and the TraversableMixin as bases and you have a 'Traversable DTML Method' (that's how I created the Traversable DTML Document). Mail me for any problems. Many thanks to Itamar for pointing me in the right direction, and to Ian for initiating this mindwave. Enjoy! Shalabh Ian Sparks wrote:
I don't see DTML Methods as "chopping off" the URL so much as "consuming" parts of it. SQL Methods have this behaviour now :
www.mysite.com/flavor/cherry/showme
Where "flavor" is a SQL Method which takes a single parameter "cherry" and "showme" is a DTML Document which makes some use of the flavor SQL Method. In this instance "flavor" consumes the next part of the url because it is looking for a parameter and when it is finished hands on control to the next, unconsumed part of the URL "showme".
Notice though that I have to have the "showme" DTML Method to actually display the results. If "flavor" was a parmeterized DTML Method my URL could become :
www.mysite.com/flavor/cherry
which makes more sense to me. In this case the "flavor" DTML Method would consume the "cherry" parameter, perhaps call some SQL Method to get the data for the "cherry" display and then display itself.
If the parameters could have defaults then I could have URL's like :
www.mysite.com/members/ian/ www.mysite.com/members/ian/home www.mysite.com/members/ian/preferences www.mysite.com/members/ian/todo
Where "members" is a DTML method which takes parameters <username>,<subsite> (default : "home") and decides what to display based on the parameters passed.
This allows my "users" to become virtual (by which I mean DB-based). I can do the last 3 URL's now with SQL Methods ("home", "preferences" and "todo" become DTML documents or methods which are aquired) but I can't do the first URL because SQLMethods don't do any rendering for display.
Well, that got rambling but it lays my argument out in full I think.
- Ian.
_______________________________________________ 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 )