For one site, I want to be able to upload and select a set of files and display download links in the template. The main issue is, that I obviously want a nice name shown on the website and not just the filename with all its characters restrictions.
I’ve tried various possibilities, but none of them seem very user-friendly for the person having to deal with managing the list of files. So maybe I’m missing something obvious or maybe someone has a great idea.
Every file has a filename that you can edit.
- Can directly be edited on the panel page
- The name is saved with the file itself
- Your character set is restricted, e.g. no spaces, no capital letters, etc.
- It’s a filename and not a display name
When inserting a file in a
textarea you can specify a display text
(file: wow.pdf text: WoW)
- Kind of visible inside the text itself
- Can’t insert multiple files at once
- The display name is only persisted in the text and not actually connected to the file
- The user has to learn the KirbyText syntax
The File Template
One of the more obvious solutions is to add a file template with a field for a display name.
filesfield allows selecting of multiple files
- Display name is saved with the file itself
- The user has to learn how to navigate the file detail page
- Mixes all files of a page and the only selected files
- The separate page, makes it harder to keep track of what is and isn’t selected
filesfield isn’t showing the display name in the list
structure field, we can have a table with the columns “file” and “display name”.
- File and display name are shown on the panel page itself
- Doesn’t need to remember the KirbyText syntax
- Doesn’t need to navigate away to the file details page
- Can’t select multiple files at once
- The display name is only persisted in the structure and not actually connected to the file
So does anyone have some additional suggestions, some plugin I’ve not discovered yet, or even something natively implemented that I simply missed?