[Zope] zpt link to file
Tino Wildenhain
tino at wildenhain.de
Mon Aug 11 13:37:36 EDT 2003
Michael Bleijerveld wrote:
> Hi,
>
> The following statements are converted from DTML. Files are stored in a
> Localfs object.
>
> <tr tal:repeat="files batch" >
> <td><input type="checkbox" name="ids:list" value="<dtml-var id>"></td>
> <td><a href="HOME_URL" tal:attributes="href here/user/id"
> tal:content="files/id">HOME TITLE OR ID</a></td>
> </tr>
>
> 1) The link to the file doesn't work. Must I replace attributes with another
> statement ?
> 2) I want to make user variable. How can I solve this ?
>
> Regards.
>
> Michael
>
<tr tal:repeat="files here/batch">
<td><input type="checkbox" name="ids:list" tal:attributes="value
files/id"></td>
<td><a href="whatever" tal:attributes="href files/absolute_url"
tal:content="files/title_or_id">The file</a></td>
</tr>
1.) this should work now if I understand your example
2.) You dont want to do much programming in ZPT since
ZPT is for presentation only. The simpler the better.
Form your values outside of ZPT with one or more
python scripts. You can return any nested lists and
dictionaries.
HTH
Tino Wildenhain
More information about the Zope
mailing list