I got FileDownload 2.0 and made it working.
I want to use a new template for FileDownload. So I created a chunk named FileDownload and pasted the default template into the chunk. Unfortunately it is not working. I get a table with a row for each of my downloads but the content itself is missing.
Any idea?
TIA, Michael
The chunk is:
<!-- This is the header template -->
<table>
<tr[+fp.class+]><td colspan="4"><strong>Path: [+fp.path+]</strong></td></tr>
<tr><th colspan="2">Filename</th><th>Filesize</th><th>Date</th></tr>
<!-- Fd:Splitter -->
<!-- This is the parent template -->
<tr[+fp.class+]>
<td><img src="[+fp.image+]"/></td>
<td colspan="3"><a href="[+fp.link+]">Up Level</a></td>
</tr>
<!-- Fd:Splitter -->
<!-- This is the folder template -->
<tr[+fp.class+]>
<td><img src="[+fp.image+]"/></td>
<td colspan="3"><a href="[+fp.link+]">[+fp.filename+]</a></td>
</tr>
<!-- Fd:Splitter -->
<!-- This is the file template -->
<tr[+fp.class+]>
<td><img src="[+fp.image+]"/></td>
<td><a href="[+fp.link+]">[+fp.filename+]</a> <span style="font-size:80%">([+fp.count+] downloads) [+fp.delete+]</span></td>
<td>[+fp.sizetext+]</td>
<td>[+fp.date+]</td>
</tr>
<tr><td></td><td colspan="3">[+fp.description+]</td></tr>
<!-- Fd:Splitter -->
<!-- This is the delete link template -->
<a href="[+fp.deletelink+]">Delete</a>
<!-- Fd:Splitter -->
<!-- This is the template used when &groupByDirectory=`1` -->
<tr[+fp.class+]>
<td colspan="4"><strong>[+fp.directory+]</strong></td>
</tr>
<!-- Fd:Splitter -->
<!-- This is the footer template -->
</table>
The snippet is:
[!FileDownload?getFolder=`downloads` &tplList=`FileDownload` &splitter=`<!-- Fd:Splitter -->`!]
pretty sure there is typo in all of the placeholders. it should be fd not fp. eg. [+fd.link+] not [+fp.link+]
Yes, thanks. There is a typo in the documentation. I just found it one hour ago.
Michael