[Product-Developers] Re: Content Rules - Create Folder action

Martin Aspeli optilude at gmx.net
Sat Jul 5 17:42:07 UTC 2008


David Bain wrote:
> How do I go about creating a folder with a content rule/trigger.
> I see actions such as notify, copy to folder etc... but nothing like:
> "create folder" or "create object"

Take a look at 
http://plone.org/documentation/tutorial/creating-content-rule-conditions-and-actions 
- you'll need to create a new content rule action, but that shouldn't be 
so hard.

> Is there an add on for this already? Or does it need to be written?
> 
> The use case is the ability to archive events based on month. The
> rules would be:
> 
> On adding an event
> 1. Create a folder structure (if it does not exist) based on year and month
> 2. move the event to the year/month folder

I would possibly just make a bespoke action type for this use case, 
rather than try to generalise too much. You'll need some logic to 
determine where to create the folder and what to name it that's probably 
not going to be easy to generalise beyond this use case.

Martin

-- 
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book





More information about the Product-Developers mailing list