How would you display a variable amount of files (less than 5) for multiple categories per page.. for instance.
on Jim’s page he has access to PDfs for Flowers (3 of them) and Vegetables (2) .. the schema is the same, but files different for them all... looking at 30 pages.
Any thoughts? Other than making 5 TV values to hold each PDF file?
-
MODX Staff
- 2,502 Posts
Shawn,
You could put them in a directory or directories and write a small snippet to read the dir(s) contents. I’m not sure if you need to be able to select specific files from a directory or what.
Cheers,
Jay
Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup
magician.
Blog ✦
Twitter ✦
LinkedIn ✦
GitHub
I ended up using the lovely filedownload snippet that allows multiple directories listed.
I then used a TV to hold the root folder string