IfEmpty 0.1.0-rc1

IfEmpty 0.1.0-rc1

Released Jan 13, 2010 by
A simple snippet that looks in a directory to see if there are any files. If the directory is empty it returns a message from a custom chunk. This was written to work alongside the FileDownload snippet, however, it will work just fine by itself. Download 1kb (175 downloads)
1 Likes, 0 Dislikes
Report this Extra
Downloads: 175
License: GPLv2
Discuss Extra
Requires Evolution 1.0.x or greater
Supports mysql
This snippet looks in a folder to see if there are any files. If the folder is empty it returns a message from a custom chunk. This was written to work alongside the FileDownload snippet, however, it will work just fine by itself. This snippet takes two required parameters: &path (path to file) and &message (chunk name).

Installation Instructions

1. Create a new snippet called IfEmpty.
2. Copy and paste the text from the IfEmpty.txt file.
3. Call the snippet from your chunk or document.*

*Note: both the &path and the &message parameters are required.

If you wish to use this snippet to augment the FileDownload snippet just place the call after your FileDownload snippet call.

Example calls:



[!IfEmpty? &path=`path/to/your/folder` &message=`your_chunk_template_name` !]