ZClass/DTML Document transparency
Hi all, I have a folder (foo) which contains a set of DTML Documents, and instances of a ZClass.
From another DTML document, I enumerate the contents of this folder, using a DTML-IN tag:
<dtml-in expr="bar.foo.objectValues()" sort="order"> ... </dtml-in> My problem is with ..., namely dealing with both DTML documents and ZClasses. In the case of DTML Documents, the following works fine: <dtml-var sequence-item> In the case of ZClasses, I have to use something like this: <dtml-with sequence-item> <dtml-var index_html> </dtml-with> So I'm using this: <dtml-if expr="_['sequence-var-meta_type'] == 'DTML Document'"> <dtml-var sequence-item> <dtml-else> <dtml-with sequence-item> <dtml-var index_html> </dtml-with> </dtml-if> But this is rather ugly, and it's the sort of thing one shouldn't have to do in an oo system. So, is there a better way? -Randy
participants (1)
-
Randall Kern