new tag: File List on Frontend (e.g. list of pdf newsletters)
Posted: Fri Jun 06, 2008 5:40 pm
I've been looking for a module/tag that would automatically create a list of PDF newsletters and display them on my site. The closest I found on the forge was a module called File List (not to be confused with the filelist tag released yesterday by Wiedmann) but there is yet to be anything uploaded to it. Hence I've tried to make my own despite my non-existant knowledge of PHP using the random image tag as a guide. I've learnt a lot from it and have now released a complete alpha version to forge for anyone who wants to try it.
To use the tag, you simply have to upload the files you want to display to a folder by FTP or using a file manager. The tag then creates an html table and populates it with a file extension icon, file name (as link to open the file in a new window), file size and file date for each entry. Using parameters in the tag you can choose which folder to watch, whether to show column headers, and the sort order.
At the moment, it is still quite basic and there are one or two errors that I haven't quite figured out, but it works okay on my test site at the moment. I used a similar plugin from another CMS as inspiration. This plugin had extra cells with to space columns out better but I believe that isn't very accessible and should be done by CSS instead (unless someone knows better?)
Hopefully this'll help a few others who're looking for a way to display a list of PDF newsletters for example.
http://dev.cmsmadesimple.org/projects/file-list-table/
To use the tag, you simply have to upload the files you want to display to a folder by FTP or using a file manager. The tag then creates an html table and populates it with a file extension icon, file name (as link to open the file in a new window), file size and file date for each entry. Using parameters in the tag you can choose which folder to watch, whether to show column headers, and the sort order.
At the moment, it is still quite basic and there are one or two errors that I haven't quite figured out, but it works okay on my test site at the moment. I used a similar plugin from another CMS as inspiration. This plugin had extra cells with to space columns out better but I believe that isn't very accessible and should be done by CSS instead (unless someone knows better?)
Hopefully this'll help a few others who're looking for a way to display a list of PDF newsletters for example.
http://dev.cmsmadesimple.org/projects/file-list-table/