Hello there
As usual I have crazy proposal that potentially may result in more effective and clean template writing.
As long as I know, today in order to handle differently file types (lets say images diferently than music) I have to write something like this
[file.jpg=file.jpeg=file.gif=file.png=file.bmp= ...and other 1000 types of image...]
<tr> <td> handle images one way </td> </tr>
[file.mp3=file.m4a=file.aac=file.flac=file.mpc= ...and other 1000 types of audio...]
<tr> <td> handle audio files another way </td> </tr>
[file.avi=file.mkv=file.mp4=file.flv=file.mpg= ...and other 1000 types of video...]
<tr> <td> handle video files third way </td> </tr>
In my example it looks compact but is actually not.
1. we indeed have thousands of file types for audio/video/pictures/other documents.
2. consider if type-specific section handles only small part of whole HTML code - file icon - but all other attributes are handled uniformly
[file=folder]
<tr><td><a href="%item-url%">
[+file.jpg=+file.gif....]
<img src="/images/picture.png">
[+file.avi=+file.mkv....]
<img src="/images/video.png">
[+file=+folder]
</td><td>... all item attributes</td>
[+file.jpg=+file.gif....]
<button onclick="preview('%item-url%')">Preview</button>
[+file.avi=+file.mkv....]
<button onclick="play_flash('%item-url%')">Play</button>
[+file=+folder]
</tr>
Nice feature, isn't? Now consider every section [file.xxx=..] indeed includes many types?
My proposal is as follows. Support for file section like this [file|mime: filter].
For example [file|mime: images/*] would match every images registered in HFS MIME-types list; [file|mime: image/jpeg] would match only JPEG images etc.
This format is just proposal. There are different variants, like [file(image/*)]. This has advantage that it can be used like this: [+file(images/*)=+file(video/*)]
Hope rejetto finds it useful.