[ZPT] what is the TAL equivalent of this DTML code!!

RN Bristow Robert.Bristow at bristol.ac.uk
Thu Jul 15 11:04:52 EDT 2004


Vaibhav

Something like:

<h4 tal:define="global file_obs python:here.objectValues(['File'])"
    tal:condition="not:file_obs">There are no Papers</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>
  <th>Size</th>
 <th>Modification Date</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>
  <td tal:content="file_ob/file_size">22K</td>
  <td tal:content="file_ob/file_date">2001/09/17</td>
 </tr>
</table>

Does the job for me

Hope that helps

Robert

Robert Bristow, Information Services Manager
Graduate School of Education, University of Bristol
35 Berkeley Square, Bristol, BS8 1JA, UK
+44 (0) 117 928 7029, robert.bristow at bristol.ac.uk
http://www.bristol.ac.uk/education

On Thu, 15 Jul 2004, [iso-8859-1] vaibhav uprety wrote:

> Hi
>
> i have written this DTML method for showing the files in a folder. This method works fine. please help me to implement this in form of a page template.
>
> Here is the DTML method
> ---------------------------------------------------------------------------------------------------------
> <dtml-if "objectItems('File')">
> <table width="100%">
> <dtml-in "objectItems('File')">
> <tr>
> <td>
> <a  href="<dtml-var absolute_url>">
>   <dtml-var id></a></td>
> </tr>
> </dtml-in>
> </table>
> <dtml-else> NO DOCUMENTS FOUND</h3>
>  </dtml-if>
> ---------------------------------------------------------------------------------------------------------
>
> Thanks in advance
>
> Vaibhav Uprety
>
> Yahoo! India Careers: Over 65,000 jobsonline.


More information about the ZPT mailing list