[Zope] how is this in zpt?

Harry Wilkinson harryw@nipltd.com
Mon, 18 Feb 2002 11:26:31 +0000


On Monday 18 February 2002 10:28 am, Harry Wilkinson wrote:
> What it would be in ZPT depends on where these variables come from.  The
> acquisition in ZPT is a bit more explicit.  If those variables are in the
> context, though, it would be something like this:
>
> <div tal:repeat="python: here.objectValues('Folder')" tal:omit-tag="">
>   <img border="0" tal:attributes="src here/icon">
>   <div tal:replace="here/id">the id</div>
> </div>
>

Oops.  I just remembered something I missed.  Correction:

<div tal:repeat="value python: here.objectValues('Folder')" tal:omit-tag="">
  <img border="0" tal:attributes="src here/icon">
  <div tal:replace="here/id">the id</div>
</div>

I forgot to include the variable you use in the tal:repeat, 'value' in this 
case.  For each iteration, value would an item in whatever sequence is 
returned by objectValues().



> On Monday 18 February 2002 9:53 am, Daniel Meier wrote:
> > hi there
> >
> > how does this look in zpt? i couldn't figure it out?
> >
> >
> >
> > <dtml-in "objectValues('Folder')">
> >   <IMG BORDER="0" SRC="<dtml-var icon>">
> >   <dtml-var id>
> > </dtml-in>
> >
> >
> >
> > best regards
> >
> > daniel
> >
> >
> > _______________________________________________
> > 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 )
>
> _______________________________________________
> 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 )