Configuring User Defined Labels
Set up the User Defined Labels widget.
The User Defined Labels widget is baked into your microsite. If you're using a microsite, you can skip the widget setup and see Platform Configuration for your next steps. Or, if you want to use the widget on your website and you haven't configured your site to use widgets yet, see the Quick Start Guide.
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. Ideally, add it with the Language and Locale widget.
Widget Configuration
Required Attributes
- Label Name
- This associates the application label you set up with this widget so it can display on your site.
- Attribute: name
- Valid Value: label name you defined in Application Labels, without the prefix "mpp-user-label."
- Example: If your application label was called "mpp-user-label.SampleLabel", your label name would look like this:
name="SampleLabel"
Optional Attributes
- Bare Text
- This determines whether to include CSS selectors or just a text object for your label.
- Attribute: bare
- Valid Value: true or false; if true, the label will just display bare text with no extra markup or CSS applied
- Example:
bare="true"
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
- You must be a system administrator to do this.
Set up each application label you want the User Defined Labels widget to display on your site.
You can now add your label to the Widget Configuration.
Once you add your label in the widget, you can place the widget code on your website where you want that label to display. Then, depending on which language a person has selected, they'll see the translated text.
Customization
Customize the User Defined Labels widget to match your church brand.
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!
- #mppw-user-label: Use to select the label by its ID.
- .mppw-component-container: This class is used in several widgets.
- .mppw-user-label: Use this to style all user-defined labels on the page in the same way.
- .mppw- appended with the label name (without any spaces or special characters): Use this to style the individual user-defined label.