[Zope] Newbie: Missing a Variable (TAL/METAL Question)

beno - purabachata at yahoo.com
Wed Jul 26 18:04:18 EDT 2006

  I have the following block of code:
  <table tal:define="objects here/objectValues;
                   sort_on python:(('title', 'nocase', 'asc'),
                                   ('bobobase_modification_time', 'cmp', 'desc'));
                   sorted_objects python:sequence.sort(objects, sort_on);
                   start python:getattr(request, 'start', 0);
                   batch python:modules['ZTUtils'].Batch(sorted_objects, size=10, start=start);
                   previous python:batch.previous;
                   next python:batch.next">
  <tr tal:repeat="item batch">
    <td tal:content="item/title">title</td>
    <td tal:content="item/bobobase_modification_time">
      modification date</td>  
    <td tal:content="here/author">author</td>
    <td tal:content="here/content">content</td>

  that works fine. But I'd like to call the following in that table:
  <td><tal:content metal:use-macro="here/XXX/macros/author"></tal:content></td>

  where "XXX" is the "item" that changes each time a new item from the batch is called. In other words, there is a folder with a "batch" of files, and each file is an "item". So, since the files' titles are simply sequential numbers, it would look something like this:
  <td><tal:content metal:use-macro="here/1/macros/author"></tal:content></td>
<td><tal:content metal:use-macro="here/2/macros/author"></tal:content></td>
<td><tal:content metal:use-macro="here/3/macros/author"></tal:content></td>
  How do I do that? Even better, is it possible to just open up each file and read its contents??

Do you Yahoo!?
 Get on board. You're invited to try the new Yahoo! Mail Beta.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20060726/b8bbe84d/attachment.htm

More information about the Zope mailing list