[ZPT] single TAL file for displaying contents!

vaibhav uprety uprety_vaibhav at yahoo.co.in
Tue Jul 27 05:01:22 EDT 2004


Hi,

I have a list of folders in my site in which i keep
documents for different locations. I am using the
following TAL code to display the files in a
particular folder.

-----------------------------------------------------
<h4 tal:define="global file_obs
python:here.objectValues(['File'])"
    tal:condition="not:file_obs">No Documents are
available in this category</h4>
<!-- If we find some, then do the table stuff -->
<table border="1" cellpadding="5" cellspacing="0"
       tal:condition="file_obs">
 <tr>
  <th>Name</th>
 </tr>
 <tr tal:repeat="file_ob
python:here.objectValues(['File'])">
  <td><a tal:attributes="href file_ob/absolute_url"
        
tal:content="file_ob/title_or_id">__file_ob__title_or_id_</a>
  </td>
 </tr>
</table>
-------------------------------------------------------

But i have to copy this code to every folder in order
to display the file contents of that particular
folder. 

Is it possible to display the contents of different
folders by creating a single page template?

Vaibhav Uprety

________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony


More information about the ZPT mailing list