Example: Create a blog

by Hans-Peter Locher last modified Feb 04, 2009 03:06 AM
A simple example is to create a blog, enabling to create blog entries with emails. In the example we want to create News items inside a Folder called `webblog`. The global InBox of the portal(named `globalinbox`) receives the mails. The mails are then checked if their header `Subject` contains `blog`.

 

1. Create the structure

 

  • Create the InBox `globalinbox`
  • Create the Folder `webblog`
  • Mark `webblog` with `IBlogMailDropBoxMarker` (using @@manage_interfaces)
marker
  • Reindex `webblog`

 

2. Create the content rule

 

  • Event trigger: Object added to this container
  • Condition: Email Header
    Specify `Subject` as header to check, and `blog` as value. emailheader

 

  • Action: Deliver

    Specify `webblog` as key.

deliver

 

 

  • Action: Delete Object



3. Assign the created rule to the `globalinbox`

 

blogmail

 

 

4. That's all


This would be sufficient to create the News items. Of course, you're free
to specify content rules for the `webblog` too. For example
to publish news items after they have been added, so anonymous visitors would see them,
or anything you can imagine.