goldsky / FileDownload-R

FileDownload snippet for MODX revolution
12 stars 7 forks source link

Files first - feature request. #10

Closed apcherry closed 11 years ago

apcherry commented 11 years ago

My apologies if I've missed the option but I would like a simple way to put the file listing above the directory listing.

The extra worked fine straight out of the box, I'm using the example with

[[!FileDownload?
&getDir=`assets/downloads`
&browseDirectories=`1`
&tplWrapper=``
&tplWrapperDir=`tpl-wrapper-dir`
&tplWrapperFile=`tpl-wrapper-file`
]]

However I'm trying to list an archive of newsletters so I would prefer to list the files first before the directories. I've created directories for 2011, 2010 etc and being older newsletters I'd like the tpl-wrapper-dir output to appear below the tpl-wrapper-file output.

Many thanks.

goldsky commented 11 years ago

done here https://github.com/goldsky/FileDownload-R/commit/7acf94d5d98d4b96a04652b13982d59afdccb60c download the 1.1.2-pl version, and as a quick example, use this call

[[!FileDownload? 
&getDir=`assets/downloads` 
&browseDirectories=`1`
&tplWrapper=`tpl-wrapper-swap`
&tplWrapperDir=`tpl-wrapper-dir`
&tplWrapperFile=`tpl-wrapper-file`
]]
apcherry commented 11 years ago

Brilliant - thanks for the prompt update. It worked perfectly and it is appreciated.