Prayers API

by Skyler Katz | Last edited: 10/9/2020

NOTE: You must begin by choosing "Create a Prayer Cloud account" under Connect > Prayers in order for this module to work correctly.

Display mode: list

Show

before_show, after_show

Here are the tags available to before_show in the prayer list:

Tag Description
__pagination__ The pagination links for all of the prayers
__totalpossible__ The total number of prayers for the site
__totalreturned__ The total number of prayers returned in the current request
__createprayerurl__ The url to the create a prayer form. This link can be embeded in an iframe, lightbox, or a popup window.
Styling options for __createprayerurl__

The form uses Bootstrap 4 styling by default. You can override any styles by creating a CSS file at /_assets/css/prayer-cloud.css.

Inline Parameters for __createprayerurl__
Inline Parameter Description
withgroups A comma seperated list of group slugs to auto assign created prayers to. If this tag is not included, all prayers will be added to the Site Group.
withcategories A comma seperated list of category slugs to auto assign created prayers to.
allowcategoryselection='yes' If allowcategoryselection='yes' is included then a multi-select dropdown will be included on the form where a user can select which categories to add their prayer to. This field words independently of withcategories and will display all categories in the prayer module.
categoryselectlabel By default the category selection label is "Categeories". You can override that here.

Example:

"before_show:__createprayerurl withgroups='prayer-group' withcategories='campus-one' allowcategoryselection='yes' categoryselectlabel='Campuses'__",

The above example would automatically add the prayer to the group Prayer Group, the category Campus One, allow the user to select other categories (even if they don't select the category Campus One it will be assigned that category), and will display the dropdown with a label of Campuses.

show

Here are the tags available to show in prayers list view:

Tag Description
__id__ id of the prayer. Unlike other modules, the prayer id is a string UUID
__name__ name of the person who submitted the prayer
__email__ email of the person who submitted the prayer
__phone__ phone number of the person who submitted the prayer
__prayer__ prayer of the person who submitted the prayer
__recieved__ formattable date that the prayer was submitted. Use __recieved format='j/m/Y'__. A complete list</a > of tags is available.
__acknowledgmentcount__ number of times the prayer has been acknowledged
__acknowledgmenturl__ url to acknowledge a prayer. If you use the link directly, the response to hitting this url directly is JSON, but includes checks to ensure a user cannot acknowledge the same prayer more than once. It is recommended to interact with this link using javascript, so that the visitor does not leave the site. If you use javascript, be sure to implement some sort of cookie tracking to ensure the link is only pressed once. An example can be found here</a >.
__category__ title of the category
__categoryslug__ slug of the category
__categoryX__ Title be repeated once for each category assigned
__categoryXslug__ Slug be repeated once for each category assigned
__group__ comma separated list of group names
__groupslug__ slug of an associated group
Parameters

 

find_category

Only show items assigned to that category. Can find multiple categories with a comma separated list.

Example:

"find_category:category1,category2,category3",

hide_category

Will not show items assigned to that category.

Example:

"hide_category:category-slug,category-slug2",

howmany

Sets the maximum number of items to display

Example:

"howmany:3",

Display mode: detail

find_id

Select a prayer by ID.

Show

show

The same tags are available for display:detail as with display:list.