Sitefinity CMS

Newsletters Public Controls Send comments on this topic.
See Also
Sitefinity Building Parts > Modules > Newsletters > Newsletters Public Controls

Glossary Item Box

This topic provides a description of the public controls of the Newsletters module available in Page Edit mode:

Newsletters Public Controls

Figure 1

Subscription Form

Description 

This is the Newsletters public control that allows a user to subscribe to a given newsletter.

For more information on newsletters' creation and manipulation, see Newsletters Overview.

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:

Newsletters Public Controls - Subscription Form Email Mode Display

Figure 2

 

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 request:

Newsletters Public Controls - Subscription Form EmailAndNames Mode Display

Figure 3

 

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:  

Newsletters Public Controls - Subscription Form Email Mode Display - Automatically Added Credentials

Figure 4 

 

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 control:

Newsletters Public Controls - Subscription Form Designer

Figure 5 

 

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:

Newsletters Public Controls - Subscription Form Properties Sections

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:

  1. Main section: SubscriberGroups should include a selected subscriber group using the Select button 
  2. Behavior section: Visible should be True

 

Following are some additional settings that could be made to extend the functionality of the Subscription Form control:

  1. 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).
  2. 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.
  3. 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.

  

 

Unsubscribe Link

Description 

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 7:

Newsletter Public Controls - Unsubscribe Link

Figure 7

 

In Figure 7, the cursor was at the end of the newsletter body, and therefore the following text is displayed at the end:

[unsubscribe]Unsubscribe now[/unsubscribe]

 

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 text:  

[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 following 

[unsubscribe] X [/unsubscribe]

with

        < a href=”~/ControlTemplates/Newsletters/ConfirmUnsubscription.aspx?Email=subscriberMail” >  X </a>

 

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 process.  

   

See Also