I’ve created several pages that list the contents of specified directories that users have access to upload files to i.e.:
Marketing Materials --> Displays contents of /assets/Marketing --> Accessible by user "jdoe"
Sales Materials --> Displays contents of /assets/Sales --> Accessible by user "jsmith"
I want to create an area on another page that displays the most recent uploads to these directories.
~~ Recent Additions ~~
Marketing Materials - Marketing Paper.pdf
Sales Materials - Sales Document.pdf
Any ideas on how to accomplish this?
I edited this to be more specific in hope of finding an answer.
-
☆ A M B ☆
- 24,524 Posts
You can use the FileDownload snippet with the &userSort and &groupByDirectory parameters.
http://www.muddydogpaws.com/development/filedownload/parameters.html
As far as limiting the number, I’m not sure how that would work; there doesn’t seem to be a limit parameter. Maybe PHx would be useful here?
I think it could be hacked easily enough (line 166, immediately after the array is run through the custom_sort() function) to truncate the array to the number of items you want to show. This might be a good addition to the parameter list as well, &fileLimit or something.