This topic provides a description of the public controls of the Newsletters module available in Page Edit mode:
This is the Newsletters public control that allows a user to subscribe to a given newsletter.
The control has two modes: Email and EmailAndNames.
Figure 2 shows what the Subscription Form control displays after added to a page and after setting the default control property (see Setting the Public Controls). This is in the default mode of the control - Email - where a
single textbox is displayed and it requires only the email address of a user in order to accept the subscription request:
Figure 3 shows what the Subscription Form control displays after added to a page and after setting the default control property (see Setting the Public Controls), and changing the control mode - EmailAndNames. This
mode contains three textboxes and it requires the email address of the user as well as the first and last name in order to accept the subscription
When the user is logged in the system (web site) and is a CMS user (belongs to a Sitefinity role), the credentials of the user will be
automatically added to the corresponding fields. For example, if the administrator adds the control to a page, it should contain his/her credentials when
viewing the live page:
Setting the Public Controls
There are two property tabs for the Subscription Form control - Basic and Advanced.
The Basic tab is a designer for the Subscription Form control, as shown in Figure 5. It provides user-friendly way to make the necessary settings in order to use the
||The SubscriberGroups property is the default one for this control. The control will not work until this
property is set to a specific group.
||Setting the properties in the Basic tab is enough to make the Subscription Form control work. The properties in
the Advanced tab, however, provide advanced functionality for extending the control.
The Advanced tab contains sections with the properties of the Subscription Form control as shown in Figure 6:
Following are some basic settings that need to be made to work with the Subscription Form control when not using the control designer:
- Main section: SubscriberGroups should include a selected subscriber group using the
- Behavior section: Visible should be True
Following are some additional settings that could be made to extend the functionality of the Subscription Form control:
- Main section: FormFields should be set to EmailAndNames when there should be three input fields in the control - email, first
name and last name. The default value is just an email field (Email).
- Behavior section: SuccessSubscriptionPage should be set to the path of a custom page that confirms a successful subscription using the control.
The default page is placed in the control templates of the Newsletters module, Sitefinity folder.
- Behavior section: FailurSubscriptionPage should be set to the path of a custom page that stated that the subscription using the control has
failed. The default page is placed in the control templates of the Newsletters module, Sitefinity folder.
The Unsubscribe link is a link that could be added to a newsletter. This link is then displayed as part of the newsletter, and when clicked by a user, it will unsubscribe
him/her from receiving the current newsletter.
In order to add the link to a newsletter, put the cursor where you want the link to be added and click on the Unsubscribe link below the content editor, as shown in Figure
In Figure 7, the cursor was at the end of the newsletter body, and therefore the following text is displayed at the end:
The "Unsubscibe now" text is the default message displayed in the link and it could be replaced with any custom text. For example, the link could be added with this
[unsubscribe]Unsubscribe from this newsletter[/unsubscribe]
After clicking the Unsubscribe link, the text added to the content is meta data. Afterwards, before the newsletter is sent, a meta parser replaces the
[unsubscribe] X [/unsubscribe]
< a href=”~/ControlTemplates/Newsletters/ConfirmUnsubscription.aspx?Email=subscriberMail” > X
This link navigates to the ConfirmUnsubscription.aspx page. The transferred data that carries the email of the subscriber is encrypted.
This page asks the user to confirm his decision to unsubscribe from the current newsletter. The page provides an unscbscribe link which will begin the unsubscription