BackTalk to Document The Zope Book (2.6 Edition)/Using Zope Page Templates

[email protected]
Newsgroups gmane.comp.web.zope.zdp
Message-ID <[email protected]>
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.

_______________________________________________
ZDP maillist  -  [email protected]
http://mail.zope.org/mailman/listinfo/zdp
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.