The placeholders [[+link]] and [[+filename]] are working, but [[+count]] doesn’t.
I also tried to use [[+fd.count]], which also didn’t work.
The docs for “FileDownloadLink” is telling this:
The template for this snippet is a plain href link with FileDownloadLink’s placeholders, not a chunk or a template file. If you like to see the available placeholders, just initiate the &toArray=1 parameter.
Other placeholders like [[+sizeText]] do work, it seems just the “count” isn’t working.
What exactly do you mean by “not working”?
Does it output an empty string or always 0?
Also, you probably have to call the snippet uncached, so that the count value gets calculated for every page request.
I did a quick test and noticed, that the code creates duplicate entries in the database table modx_fd_paths.
Can you check this table and verify that all the rows are unique?
So i thought the usage of the snippet-call i posted above doesn’t need to be uncached. Though i just tested the FileDownloadLink-call uncached, which shows no difference. I also tried the opposite, meaning getImageList uncached and FileDownloadLink cached, which also shows no difference.
And yes, the code created duplicate entries in the database table modx_fd_paths as well.
Btw… by using the “FileDownload”-call (for getting folders) like this: