[ZDP] BackTalk to Document The Zope Book (2.6 Edition)/Using Zope
Page Templates
webmaster at zope.org
webmaster at zope.org
Sun Feb 1 03:55:31 EST 2004
A comment to the paragraph below was recently added via http://zope.org/Documentation/Books/ZopeBook/2_6Edition/ZPT.stx#2-60
---------------
This will return a list of any File objects in the FileLib folder.
Now, edit your 'index_html' Page Template and add some more 'tal'
attributes to your mock-up::
...
<tr tal:repeat="item container/files">
<td><a href="Sample.tgz" class="filename"
tal:attributes="href item/getId"
tal:content="item/getId">Sample.tgz</a></td>
<td tal:content="item/getContentType">application/x-gzip-compressed</td>
<td tal:content="item/getSize">22 K</td>
<td tal:content="item/bobobase_modification_time">2001/09/17</td>
</tr>
...
% Anonymous User - Feb. 1, 2004 3:55 am:
As an extended exercise, you might want to create a script that returns all of the images in a folder and its
sub-folders. Then create a Zope template that displays the above information, the absolute and relative paths
to the image, and the image itself (hopefully they aren't too large). As a further extension, limit the list
to images of a certain size or type.
More information about the ZDP
mailing list