I figured it out. Very nice snippet. Works like a charm once you read all the documentation. Thanks for the help. Cheers.
I’m using FileDownload on a client’s online resource site. It’s working great for most of the pages on the site, but I’ve encountered one that’s a bit more of an organisational challenge, a conference resources page.
At the conclusion of an annual conference, the client writes a short paragraph about each session/speaker, and links to one or more resources for each. Currently they link to the resource files from hyperlinked words within the paragraph, however I’m trying to use a new organisational concept of separating and highlighting each "resource", whether it’s a file, a link offsite or another article on the same site. This allows me to emphasise the site as a resource repository, and make it very easy for users to find the resources.
My problem is this - There were 34 sessions in this year’s conference, and the number of files associated with each session varies from 0-9. If I list the files by directory they are not grouped by session, and the alphabetical ordering puts them all over the place. It would be too inefficient to use a separate call for each of the dozens of files, and the template would separate each call, rather than listing them nicely in a group as happens when they are called from a directory. Finally, the compromise of putting the files in a subdirectory for each session which has associated files seems overly complex and would increase the learning curve for my client when they come to create the page for this year’s conference themselves.
My own idea of a solution would be to allow a comma separated list of individual files which can be drawn from a specified directory and displayed as a full directory list would be. I haven’t seen anywhere in the manual or discussion forum about this. Is this possible? If not, does anyone have a suggested solution better than those I mention above?
One final related query - is there any snippet or tool that will load any file with a specified extension (eg mp3 or mov) load in a pop-up media player when those links are clicked? This would be very useful especially if it was a dynamic thing that didn’t need individual file listings to be modified.
Thanks in advance for any help you can offer.
I’ve been experimenting a bit in this regard, to try and find a solution, and I’ve been considering using Ditto for the files. I make a weblink, use a TV for the file type icon (select from a dropdown list), write the description in another TV (far easier than editing a chunk) and format the list with a ditto template. And that works great, but there’s no way that I know of for Ditto to automatically discover and display the file size.
Am I going about this the wrong way? Would FileDownload really be better for this? Or should I ask on the Ditto threads about getting the file size?