Custom Widgets
This page documents how to use MinistryPlatform custom widgets on a page.
- Validate that Custom Widgets have been enabled for your site. Inquire with support if you're not sure. There is no additional cost for Custom Widgets.
- In MinistryPlatform go to the API Clients page and verify MP.SKY api client is configured.
- Obtain your domain prefix for your site. Launch the Add/Edit Family tool. Your domain prefix is what appears before ".cloudapps.ministryplatform.cloud".
- For Example in the URL https://catholic-demo.cloudapps.ministryplatform.cloud/tools... the domain prefix is "catholic-demo".
- Verify you can reach the API at https://<domain prefix>.cloudapps.ministryplatform.cloud/sky/swagger/index.html
- Go to GitHub Repo: https://github.com/MinistryPlatform-Community/MPCustomWidgets
- Navigate to the Widgets folder.
- Select the desired Widget.
- Open the demo.html file and grab the code in the central <div> tag that corresponds to the desired widget.
- Paste the code into the source of your desired web site page.
- Change the setting for data-cache to True.
- Change the setting for data-host to be your domain prefix (from above).
- Add this code to the page (after the code previously pasted). <script type="text/javascript" src="https://cdn.jsdelivr.net/gh/MinistryPlatform-Community/MPCustomWidgets@main/dist/js/customWidgetV1.js"></script>
- Publish the page and test the new widget.