This is my first plugin, written in response to this post. This plugin allows you to specify a path (NOT FULL URL) and it will iterate over the contents and print an ordered or unordered list of the files. It can optionally filter out various filetypes as well as create links to the files. It also allows CSS customization, as classes can be passed in for the list, list items and anchor tags. Of course, please let me know of any bugs you find.
*File updated to version 1.1 12/20/08 - Added ability to sort links using optional parameter of sort=”asc” or sort=”desc”.
Nice work!
Another thought, this would be neat to have as a custom field in the CP. For example, some sites I built need to have large mp3’s uploaded through ftp. The person updating the site could then make a weblog post and select the file they posted from a list (this could save them making a typo).
Hi Brad,
Nice little plugin there, well done. I was trying to get it working like this though :
{exp:list_contents folder_url="{site_url}images/site/layout/" links="on" list_type="ol"}
Seems that won’t work as it comes up with :
Not a valid directory path:/usr/local/psa/home/vhosts/example.com/httpdocshttp://www.example.com/images/site/layout/
Not too sure why it does that or what you would have to do to fix that but would be nice if it could work with the (as yet undocumented 😉 ) {site_url} variable.
Great addition though.
Best wishes,
Mark
Nice work! Another thought, this would be neat to have as a custom field in the CP. For example, some sites I built need to have large mp3’s uploaded through ftp. The person updating the site could then make a weblog post and select the file they posted from a list (this could save them making a typo).
That is a nice thought. Would make things really easy for clients and we all know that they need every little bit of help they can get with things!! 😉
Best wishes,
Mark
Thanks eman,
I’m really glad that you found this useful. I answered a related thread earlier where someone had commented on it - and I had all but forgotten about this (as most of the time I code directly in PHP (now with CI) as opposed to EE. At any rate, just wanted to say thanks for trying it out and finding a use for it. 😊
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.