Thank for the suggestion, I gave that a try earlier, and unfortunately it didn’t work. What happens is that the FileDetails call in its entirety is rendered as plain text. Following is an example of what is displayed where the templated FileDetails result should be seen:
[!FileDetails?file=`/documents/events/photorules.doc` &tpl=`FileDetailsTpl` &icondir=`images/`!]
To help diagnose the problem, I’ll show you the various parts of the code:
This is the Ditto call on the page:
<div class="filecontianer">{{filecontainertop}}
[!Ditto? &documents=`106` &display=`all` &sortBy=`createdon` &sortDir=`DESC` &tpl=`DittoFileTemplate` !]
</table>
</div>
(The
{{filecontainertop}} chunk calls a table which wraps the output with three columns and title cells)
This is the Ditto template
DittoFileTemplate:
[[FileDetails?file=`[+longtitle+]` &tpl=`FileDetailsTpl` &icondir=`images/`]]
<tr><td colspan="3" style="margin:0 15px 0 0; padding:0;"><p style="margin:0; padding:0 0 0 38px;">[+longdesc+]</p></td></tr>
This is the FileDetails template
FileDetailsTpl:
<tr style="margin:0; padding:0;"><td width="35px" align="center" style="margin:0;">[+icon+]</td>
<td width="435px" style="margin:0;"><p style="margin:0; padding:0;"><a href="[~[+id+]~]">[+pagetitle+]</a></p></td>
<td width="70px" style="margin:0;"><p style="margin:0 15px 0 0; padding:0; text-align:right;">[+size+]</p></td></tr>
Please note that this is in-development code, and has yet to be cleaned up and optimised.
In all cases where there is more than one Ditto call on a page using that template, or where there is one Ditto call with more than one
&documents value, the first displays correctly, but the second displays only the parts of the Ditto template not generated by the script.