Kentico CMS 7.0 Developer's Guide

User subscriptions

User subscriptions

Previous topic Next topic Mail us feedback on this topic!  

User subscriptions

Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic!  

Users can subscribe to receiving notifications about new blog comments at a blog post. It can be done in two ways:


Enabling subscriptions


You can enable users to subscribe to posts in a blog by checking the Enable subscriptions box on the Form tab of the corresponding blog document.


Enabling double opt-in


To make users confirm that the e-mail address they're subscribing with really exists and belongs to them, you can enable the double opt‑in functionality. With double opt‑in enabled, subscribers will be sent an e-mail with a confirmation link. They will have to click the link to create their subscription.


To enable double opt‑in globally for all blogs:


1. Go to Site Manager -> Settings -> Content -> Blogs.


2. Turn on the Enable double opt-in for blog post comments setting.


3. Specify how long you want the confirmation links to be valid in the Double opt-in interval setting.


The following two steps are optional. If you omit them, the system will use the default approval page located in ~/CMSModules/Blogs/CMSPages/SubscriptionApproval.aspx.


4. Place the Blog post subscription confirmation web part on a page. Adjust its properties according to your needs.


5. Enter the page's path into the Double opt-in approval page path setting.


Double opt-in should now be configured for all blogs. You can override the settings for each existing blog by selecting the corresponding blog document, switching to the Form tab and adjusting the settings in the Double opt-in category.


The functionality uses the Blogs - Subscription request e-mail template. You can insert the confirmation link into the template using the {%SubscriptionLink%} macro.


Subscribing to a blog post


Users can subscribe when leaving a comment, by checking the Subscribe me to this blog post check box. In this case, notifications will be sent to the e-mail address specified in the E-mail field above.




Users can also subscribe without leaving any comment, by clicking the Subscribe link at the top of the Leave comment form.




This displays a subscription form. The subscription can be created by entering the e-mail address to the Your e-mail field and clicking the Subscribe button.




Managing subscriptions


Users can view and manage their subscriptions in the following two places:


1. Users with access to CMS Desk can manage their subscriptions on the My Desk -> My profile -> Subscriptions tab.




2. On the live site, users can manage their subscriptions in the My account web part. The Display my subscriptions property of the web part must be enabled for this to be possible.




In both these locations, users can Delete Delete the subscription. If double opt-in is enabled and a subscription hasn't been yet confirmed by clicking the link in the e-mail the user received, they can also Approve Approve the subscription.


Unsubscription link configuration


Subscribers can also unsubscribe by clicking the unsubscription link, which is present in each notification e-mail.




For this to work, you have to do the following two things:


1. Place the Blog post unsubscription web part onto a page. It is recommended to create a special page for this purpose, as you can see at Community site -> Special-pages -> Blog unsubscribe. You can set only one specific property of the web part - Confirmation text - this is the text that will be displayed after successful unsubscription.


2. Set the URL of the page created in step 1 as the Unsubscription URL property of the blog. This can be done two ways:


In Site Manager -> Settings -> Content -> Blogs, by settings the Blog unsubscription URL property. This is the default value that will be used by default, if no other URL is set.


If some different URL is set in the option mentioned above, you can set the value of the Unsubscription URL property on the blog's Form tab. This value overrides the one set in Site Manager -> Settings -> Content -> Blogs.