I just created a 'Traversable DTML Document' product. You can get it here:
It is a ZClass product based on the TraversableMixin (which you'll have to
install anyway) to be found here:
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
Mail me for any problems.
Many thanks to Itamar for pointing me in the right direction, and to Ian for
initiating this mindwave.
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 :
> 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 :
> 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 :
> Where "members" is a DTML method which takes parameters <username>,<subsite>
> (default : "home") and decides what to display based on the parameters
> 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 - [EMAIL PROTECTED]
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-dev )
Zope maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -