Configuring Subscribe to Publication
Set up the Subscribe to Publication widget so people can sign up to receive relevant publications.
See the Quick Start Guide to get started. If the shared script hasn't been added to your website, add it to the appropriate webpage, replacing "YOUR-BASE-MP-URL" with the base URL with your base MinistryPlatform URL.
<script id="MPWidgets" src="https://YOUR-BASE-MP-URL.com/widgets/dist/MPWidgets.js"></script>
Create or identify a page on your website where you want to display the widget. To add this widget to your church website, add the code you generate in the Widget Configurator widget (with the required attributes) in the body of your chosen website page.
<mpp-subscribe-to-publication publicationid="5" returnurl="https://example-church.com/sample" verificationemailtemplateid="1200"></mpp-subscribe-to-publication>
Widget Configuration
Required Attributes
- Publication ID
- This attribute determines which publication will display.
- Attribute: publicationid
- Valid Value: Publication ID
- Example:
publicationid="5"
- Return URL
- The URL where the widget lives on your website. The verification email will use this to complete the subscription and display confirmation. For example, if you put this widget on the page at "https://example-church.com/sample" you must use that as the Return URL.
- Attribute: returnurl
- Valid Value: fully qualified URL
- Example:
returnurl="https://example-church.com/sample"
- Verification Email Template
- The email with a verification link which will complete the subscription.
- Attribute: verificationemailtemplateid
- Valid Value: Message record ID (dp_Communications.Communication_ID)Tip: This attribute uses a Message ID to send the email. If you don't see your message in the list, you'll need to mark the message to show as an option. If you want to use an existing template, you'll need to convert it to a message first.
- Example:
verificationemailtemplateid="1200"
Attributes must be included before the opening widget tag is closed. Attributes may be listed in any order and should be separated by a space or other whitespace. An attribute's value should be wrapped in quotation marks.
Configure Your Widget
- Go to your Widgets Library by appending "/widgets" to your system domain. For example,
https://example-church.ministryplatform.net/widgets. - Click the Navigate to... drop-down menu, and select Widget Configurator.
- Select the widget you want to configure, then customize your widget.
- Click Try it Out to see what your widget will look like!
- Copy the generated code from the Embed Code box.
- Add the code to the designated page on your website.
Platform Configuration
Publication: You can display any publication in the Subscribe to Publication widget, but you must add a Subscribe to Publication widget for each publication.
- On the publication record, set Available Online to True
- Description: The publication's description display above the subscribe form.
Messages: You can customize messages sent by the Subscribe to Publication widget. But to support the workflow, you must use certain tokens in the messages. See the required and optional tokens below for the three relevant messages.
- Verification Email Template: The Subscribe to Publication widget is a two-step widget, and people must use verification tokens to continue the form. Because there are no records for this person in MinistryPlatform, you can't use contact merge fields. You can personalize this message using optional tokens.
- Required: Set the [mpp_verify_email_url] token as the value of a link somewhere in this message. Use the source view to set this link. For example, the link text that displays might be "click here" or "verify".
- Optional: The [mpp_contact_first_name] and [mpp_contact_last_name] tokens will merge in the "First Name" and "Last Name" fields provided on the form.
<div>please confirm your subscription by choosing <a href="[mpp_verify_email_url]">verify</a></div>
Mark a Message to Show as an Option
When configuring your widgets, there are fields where you can select an email template. To keep the list manageable, the messages that display as options must be marked as templates.
If the message you want does not display in the Widget Configurator, you can mark it as a template on the message record. (The Template field is hidden by default through , so you'll need to unhide it first.)
- Confirm that the message you want is not an option in the Widget Configurator.
- In the navigation menu, click .
- In the Field Name column, search for Template.
- In the Page column, search for Messages.
- Open the record, and click Edit Record.
- In the Hidden field, select No.
- Click Save.
- In the navigation menu, click .
- Open the message you want to display as an option in the Widget Configurator, and click Edit Record.
- In the Template, select Yes.
- Click Save.
- Refresh the Widget Configurator if you had it open in your browser .
You can now select this message as an option when you configure the widget.
Convert a Template to a Message
Widgets use message IDs, not template IDs. You can use the Template Editor Tool to create the template you want, but you must turn the template into a message and use that ID in the widget. Here's how!
- Create and save your template using the Template Editor Tool. Make sure you can access the template.
- Open the New Message Tool, click , and select your newly created template from the list. Click .
- In the navigation menu, click .
- Open the draft you just created.
- Click the subject line to open the message record. The Message ID is listed under the subject line.
- Use this ID for the Template ID attribute value when you configure the widget.
Customization
CSS: Every widget accepts the Custom CSS attribute. Include it before the closing of the opening widget tag to customize backgrounds, button colors, and more!
Application Labels: Want to customize the filed labels on the Subscribe to Publication form? Or change the "Send" button to "Subscribe"? To make changes, go to and update the appropriate label(s). Note that you are responsible for all translations if the default is not used.
- mpp-subscribe-to-publication.mobilePhoneLabel: This is the label above the phone number field. The default is "Mobile Phone."
- mpp-subscribe-to-publication.subscriptionSuccessMessage: This is the message displayed then someone successfully subscribes. The default is "Thanks for subscribing!"
- mpp-subscribe-to-publication.submitVerificationButtonText: This is the button label to subscribe to a publication. The default is "Send".