I'm building a customer portal for work, and we are storing customer-facing files on the site in an Amazon S3 bucket. I currently have it all set up as a Structure section with an Asset field. I query for each entry using its uri, and for Folder Entry Types I pull and output its children.
My hope is that I can instead query for Asset folders and files directly, and then add a few fields to Assets (through the usual methods). Querying for files is fine, but I can't see any variables to pull folders. Would I need to write a plugin for this?
craft.assets
andasset.getFolder
and build your custom asset folder object with Twig :Dasset.getFolder
,parent
andid
.