The Content subscription web part is a pre-configured version of the Notification subscription web part. It can be conveniently used to let site visitors subscribe to notifications about the following three events:
|•||Document has been created|
|•||Document has been updated|
|•||Document has been deleted|
In the following example, you will learn how to add the Content subscription web part to your site and set it up. We will use the Corporate site sample website as the starting point. Let's presume that we want to enable site visitors to receive an e-mail whenever a new product is added.
In order for you to see the full functionality, it is necessary to have a SMTP server configured correctly. For more information on how to do this, please refer to the SMTP server configuration chapter.
1. Sign in to CMS Desk as the global administrator (login administrator with blank password by default). From the content tree on the left, select the Products title page and switch to the Design tab.
2. Add the Content subscription web part to the zoneLeft web part zone, below the Left tree menu. In the Web part properties dialog, set the following properties:
|•||Site name - (current site)|
|•||Path - /Products/%|
|•||Document type - CMS.Product|
|•||Event description - Enter your e-mail address to receive notifications about new products:|
|•||Gateway names - CMS.EmailGateway|
|•||Notification preferred format - HTML|
|•||Create event enabled - true|
|•||Create event display name - New product notification|
|•||Create event template name - MyTemplate|
and click OK.
It is important that the template you have recently created according to the Creating a notification message template topic is global or assigned to the current site.
3. Let's switch to the site visitor's perspective now. Sign out of CMS Desk.
As notifications are available only for registered users, the web part is not visible unless you log in. Use the My account link at the top of the page to display a logon form and sign in; use e.g. user name Gold with blank password. Once signed in, switch to the Products page. You should see the Content subscription web part underneath the tree menu as highlighted in the screenshot below.
If you want to receive notifications about new products on this page, you can just type in your e-mail address into the E-mail field and click Subscribe. In case that you want to verify the functionality later on, enter your own e-mail address so that you can check your inbox for notification e-mails.
4. You can immediately verify your subscription by going to the My account section again. If you switch to the Notifications section of the My account web part, you should see the notification subscription present.
5. Now you can verify that the whole setup works. Log in to CMS Desk as the administrator again. From the content tree, select Products and click the New icon above the content tree. Choose to create some new product, e.g. a Cell phone, enter some sample data about the cell phone and click Save. Check your e-mail inbox in a few minutes. You should have received a new notification message about the newly added product.
Page url: http://devnet.kentico.com/docs/5_5r2/devguide/index.html?subscribing_users_to_content_changes_notifications.htm