Receive CMS news or apple pie recipes with e-Alerts
Last week we added a new application to the Hippo Community Apps: e-Alerts. The e-Alerts service sends mails to your website visitors when content has been updated or added. These mails are generated based on interests of the visitors.
Let’s suppose there is a site that contains both news about content management software and a cooking recipe of the day. I want to receive weekly mails with news articles about content management while my mother wants daily mails with cooking recipes.
Setting up the e-Alerts
For the set up we added a new wizard to the CMS 1. In just 4 steps you have created your e-Alert. In step one you fill in the mailing details and the paths that contain interesting documents. In step two you do the mark up of the e-Alert. We have chosen Freemarker as templating engine. If you want to change your company name, logo, the footer text or the whole look and feel, just start the wizard again and change the templates.
|Wizard screen 1, mail settings||Wizard screen 2, templating|
The categories are managed in step 3 and 4. A category can be information types, recipes, sports, etc.. Each category is divided into items. Items can be news or events, apple pie or lasagne. To define an item, combine WebDAV properties on the documents inside the repository. When a document has a WebDAV property “type” with value “news” it’s a news item while property “type” with value “event” is an event. The combination “recipe/cake” and “ingredient/apple” may be your apple pie.
|Wizard screen 3, categories||Category management|
Create a registration form on your website for your visitors. The API contains functionality for e-Alert user management 2. My sample registration form is very simple, just to give you an idea. “Information type” is the only category in this e-Alert. Its items are represented by the checkboxes “events” and “news”. I get all the news and my mother can’t choose to receive any recipes for apple pies. Sorry mum!
|Sample registration form|
I’ve got mail
After configuring the e-Alerts, publishing documents and receiving user registrations it’s sending mails. I get my weekly CMS news updates and my mother gets her daily recipe.
|Sample mail, no styling applied|
- 1. For the CMS configuration see the HippoCMS.org documentation.
- 2. The package for e-Alerts is nl.hippo.hca.notifier. The package for categories is nl.hippo.hca.interests. The package for user management is nl.hippo.hca.profiles.