[Zope] RE: Syntax for dtml-in property check?
Jaroslav Lukesh
lukesh at seznam.cz
Fri Aug 15 15:02:13 EDT 2003
> Odesílatel: Dan Shafer <dan at danshafer.com>
> > <dtml-in my_sequence prefix=seq>
> > <dtml-var seq_item>
> > </dtml-in>
>
> Wow. I can't even find the prefix attribute documented anywhere. Thanks
> for pointing it out.
Zope Book, ZQR,...
> Unfortunately, either I still don't get it or I'm doing something else
> wrong. My new code snippet looks like this:
>
> <dtml-in expr="objectValues('Folder')" prefix=seq sort=title_or_id>
> <dtml-var seq_coach_id><br>
>
> Now I get a key error on seq_coach_id.
Use <dtml-var seq_var-coach_id> (?? or <dtml-var seq_var_coach_id> ??)
> I know there's a property called coach_id associated with every folder
> over which I'm iterating. So what am I missing now?
<dtml-in expr="objectValues('Folder')" prefix=seq sort=title_or_id
skip_unauthorized>
<dtml-with sequence-item>
<dtml-if "hasProperty('coach_id')">
<dtml-var coach_id>
</dtml-if>
</dtml-with>
</dtml-in>
Regards JL.
More information about the Zope
mailing list