I would like the ability to restrict the Files module to show only the extensions I want it to. I will be using the [[gallery]] module on the page and want to hide images, and show only compressed folders.
As typing code is easier to explain a concept rather than typing a wall of text, here's an example:
[[module Files ext="zip 7z rar"]]
I am asking to be able to provide a space-separated list of the extensions.
- ext is the same as +ext and means "show this file type"
- -ext means "hide this file type"
An alternative, longer-to-implement solution: ListFiles module
Would this be easy to implement? I'm hoping for a solution to this now if it is possible… instead of waiting for a more feature-rich ListFiles module that I don't need.
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
First of all:
file extension is not file type
Your wish needs clarifying then. You can either filter by extension as you suggested or by a file type as you explained, valid file types could be taken from MIME types, for example:
In my opinion, both filters would be useful.
Piotr Gabryjeluk
visit my blog
Absolutely. I couldn't agree more!
-Ed
Community Admin
Yes, I wasn't too sure on the terminology.
My main concern is to prevent images from showing up in the list — so if I can sort by MIME type and hide anything with "image" before the forward-slash, that'd be perfect.
Assuming, of course, that every image uploaded is properly detected to be an image. I can't remember what the file was, but I think I remember noticing once that the MIME type was unknown for some of my files. Most likely those were not images though.
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
Fully agreed. Go ahead !
gerdami - Visit Handbook en Français - Rate this howto:import-simple-excel-tables-into-wikidot up!
There are currently not of updated wikidot :(