Small Groups API

by Michael Cordell, Skyler Katz, Thai Ho | Last edited: 7/12/2022

NOTE: Using JSON-Esque Method

As of 6/1/2019: Many small groups API values (especially, anything location-related) will not output correctly when using the "json" option, unless you declare those tags expressly in the getContent() function. For example: "show:__latitude__".

Display mode: list

Show

before_show, after_show

Here are the tags available to before_show and after_show in the job list:

Tag Description
__googlemap__ Google map that will display markers for all of the small groups in the list
__smallgrouplisturl__ URL for main Small Groups landing page, as designated in Pages > Navigation.
before_show_mapmarker, show_mapmarker, after_show_mapmarker

Use this parameter to customize the map markers of the google map in the respective area.

Example:

display:list,
before_show:<td><div class='map' id='smallgroup' style='width: 600px; height: 600px;'></div></td>__googlemap zoom='10' div='smallgroup'__,
before_show_mapmarker: <h5>__name__</h5>,
before_show_mapmarker: <p>Customized content!</p>

This would create a google map before the small group display list, in that map when a user clicked on the marker the pop box would show the small group name and then the text "Customized content!".

Customizing google map marker image

The google map marker image can be customized, add a relative path to the markerimage argument on the googlemap tag to customize the image.

Example:

before_show:<td><div class='map' id='smallgroup' style='width: 600px; height: 600px;'></div></td>__googlemap zoom='10' div='smallgroup' markerimage='_img/mapmarker.png' scrollwheel='no'__,

This would change the marker image to a file on the front end in the folder _img called mapmarker.png.

show

Here are the tags available to show in small group list (there may be some cases where the label on the form will not match perfectly with the available tag):

Tag Description
__id__ id of the small group
__name__ name of the small group
__modificationdate__ the last time the small group was modified
__childcareprovided__ returns 1 when provided, 0 otherwise
__slug__ slug of the small group
__description__ description the small group
__resourcelink__ the link URL for this small groups resource link
__iflinknewwindow__ Returns a space (" ") if the resource link is set to open in a new window, and nothing if not. This should be included on its own line followed by the markup to output if the resource link is set to open in a new window. For example, show:__iflinknewwindow__target="_blank" will only be output for resource link set to open in a new window.
__imageurl__ url for the image of the small group
__locationname__ the name of the small group's location
__locationslug__ the slug of the small group's location
__street1__ the first street line of the small group's location address
__street2__ first street line of the small group's location address
__city__ city of the small group's location
__state__ the full name of the small group's location's state
__zipcode__ the zipcode of the small group location
__fulladdress__ the full address of the small group location
__longitude__ longitude of the small group location
__latitude__ latitude of the small group location
__statecode__ the two letter abbreviation for state of the small group's location
__category__ a comma seperated list of this small group's category
__googlemap__ the google map
__tags__ comma seperated list of small group's keyword tags
__group__ comma seperated list of content groups the small group belongs to
__dayoftheweek__ day of the week the small group takes place on
__starttime__ time the small group starts (hrs/minutes—will not output day of the week). Formatting example:
__starttime format='g:ia'__
__endtime__ time the small group ends
__startdate__ time/date that the small group first begins (formattable)
__enddate__ time/date that the small group last meets (formattable)
__frequency__ how often the group meets. (Daily, Weekly, Bi-Weekly, Monthly, Quarterly)
__groupstatus__ The status of the group (Open, Closed, Full)
__leaderfirstname__ primary leaders first name
__leaderlastname__ primary leaders last name
__leaderemail__ primary leaders email
__leaderworkphone__ primary leaders phone
__leadertwitter__ primary leaders twitter name
__leaderfacebook__ primary leaders facebook name
Parameters

 

find_category

Only show items assigned to that category. Can find multiple categories with a comma separated list. If category slugs are separated by , or || any item assigned to ANY specified category is returned. If && is used to separate only items assigned to ALL specified categories will be returned.

Example:

"find_category:category1,category2,category3",

"find_category:category1 && category2 && category3",

find_parent_category

Will return all records assigned directly to the parent OR to any of its children.

Example:

"find_parent_category:parent-category",

hide_category

Will not show items assigned to that category.

Example:

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

find_group

Only show items assigned to that group. Can find multiple groups with a comma separated list. Uses group slugs.

Example:

"find_group:group-slug1,group-slug2,group-slug3",

hide_group

Do not display items assigned to that group. Can find multiple groups with a comma separated list. Uses group slugs.

Example:

"hide_group:group-slug1,group-slug2,group-slug3",

find_frequency

Only show items assigned to that frequency. Can find multiple frequencies with a comma separated list.

Example:

"find_frequency:daily, weekly, bi-weekly, monthly, quarterly",

hide_frequency

Will not show items assigned to that frequency. Can hide multiple frequencies with a comma separated list.

Example:

"hide_frequency:daily, weekly, bi-weekly, monthly, quarterly",

find_location

Finds a list of small groups in a given location, zip code, or country/state/city string.

Example:

"find_location:location-slug",Example:

"find_location:98765",

Example:

"find_location:US|WA|Seattle",

radius

Works with find_location. Will specifiy how many miles from the location to do the search.

Example:

"radius:20",

howmany

Sets the maximum number of items to display

Example:

"howmany:3",

  (if howmany is not specified, default is 10 results)

childcare

When this parameter is included the list will only include small groups where childcare is provided.

Example:

"childcare",

find_tag

Finds all items with that tag or tags. Spaces in tags should be replaced with a dash (-).

Example:

"find_tag:tag-slug,tag-slug2",

find_day

Find by day of the week that the small group takes place on. Use the long name of the day. Can find multiple days of the week with a comma separated list

Example:

"find_day:monday,tuesday",

find_status

Find by the status of the group. (Only accepts one status, not a comma separated list)

Available Statuses are Open, Closed, Full

Example:

"find_status:open",

hide_status

hide by the status of the group. (Only accepts one status, not a comma separated list)

Available Statuses are Open, Closed, Full

Example:

"hide_status:open",

order

Orders the output of small groups.

Param Description
recent by latest created (default)
modified by latest modified
oldest by oldest created
name alphabetical, by small group name

Display mode: detail

find

Select a small group by slug.

find_id

Select a small group by ID.

Show

show

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

before_show, after_show

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

Tag Description
__googlemap__ Google map that will display markers for all of the small groups in the list
before_show_mapmarker, show_mapmarker, after_show_mapmarker

Use this parameter to customize the map markers of the google map in the respective area.

Example:

display:list,
before_show:<td><div class='map' id='smallgroup' style='width: 600px; height: 600px;'></div></td>__googlemap zoom='10' div='smallgroup'__,
before_show_mapmarker: <h5>__name__</h5>,
before_show_mapmarker: <p>Customized content!</p>

This would create a google map before the small group display list, in that map when a user clicked on the marker the pop box would show the small group name and then the text "Customized content!".

 

Customizing google map marker image

The google map marker image can be customized, add a relative path to the markerimage argument on the googlemap tag to customize the image.

Example:

before_show:<td><div class='map' id='smallgroup' style='width: 600px; height: 600px;'></div></td>__googlemap zoom='10' div='smallgroup' markerimage='_img/mapmarker.png__,

This would change the marker image to a file on the front end in the folder _img called mapmarker.png.

Disabling Scroll Wheel Zooming on the google map

You can disable scrollwheel zooming by adding an additional tag to the api call.

Example:

"show:<div id='map'>__googlemap scrollwheel='no'__</div>",

This would tell google to disable scrollwheel zooming on the embedded map.

 

Display mode: categories

Show

level#
TagDescription
__bid__ Internal system ID of the category for unique identification.
__count__ Numerical count of the articles belonging directly to the category.
__level__ Hierarchical level of the category. The root level is considered level 1.
__name__ Name of the category as entered in the backend.
__parentid__ Internal system ID of the category's parent. This is set to '0' if the category has no parent.
__slug__ Slugged version of the category name.

Parameters

parent_category

Specifies the parent category slug to use as the hierarchical root to start from.

Example:

"parent_category:slugged-category-name",

Full Example

getContent(
   "MODULETYPE",
   "display:categories",
   "level1:Parent: __name__ (__count__) ",
   "level2:Child: __name__",
   "level3:Grandchild: __name__",
);

 

Display mode: members

find

Select a small group by slug.

find_id

Select a small group by ID.

howmany

Limits the request to a maximum number of members.

role

A Small Group member can have one of three basic roles in the group: Member, Leader, or Primary Leader.

Use this filter to define the type(s) of small group members to include in your request.

Param Description
primaryleader only the primary leader (default)
leader all group leaders (primary leader plus other leaders)
otherleader all group leaders excluding the primary leader
member small group members (no leaders)
all members of any role
order

Orders the output of group members.

Param Description
role by member role, leaders listed first (default)
firstname alphabetically by first name
lastname alphabetically by last name
delimiter

Inserts a string between all members output with "show" tags. Helpful for creating comma-separated lists.

emailencode

Encodes email addresses to prevent harvesting (used by default). To disable email encoding, add "emailencode:no" to the getContent call.

before_show, after_show

Available for adding markup before and after output from "show" tags.

show
Tag Description
__id__ The ID of the member's account
__role__ The name of the member role
__rolevalue__ The integer value of the member role
__slug__ The member slug (i.e. "john-doe")
__firstname__ The member's first name
__lastname__ The member's last name
__fullname__ The member's first and last name
__emailaddress__ The member's email address (encoded by default)
__altemailaddress__ The member's alternate email address (encoded by default)
__birthdate__ The member's birth date
__workphone__ The member's work phone number
__cellphone__ The member's mobile phone number
__homephone__ The member's home phone number
__photourl__ The member's profile image URL (no image parameters available for this tag, as of 4/5/19)
__websiteurl__ The member's website URL
__rssfeedurl__ The member's RSS feed URL
__podcasturl__ The member's podcast URL
__facebookusername__ The member's Facebook username
__twitterusername__ The member's Twitter username
__about__ The member's bio
Examples

Show all leaders as a comma-separated list:

getContent(
"smallgroup",
"display:members",
"find:my-small-group",
"role:leader",
"delimiter:, ",
"before_show:<p class='meta-leaders'>",
"show:__fullname__",
"after_show:</p>"
);

Show all group members in a table, ordered by role:

getContent(
"smallgroup",
"display:members",
"find:my-small-group",
"role:all",
"order:role",
"before_show:<table><tbody>",
"before_show:<tr>",
"before_show:<th align="left">Name</th>",
"before_show:<th align="left">Role</th>",
"before_show:</tr>",
"show:<tr data-role="__rolevalue__">",
"show:<td>",
"show:__fullname__",
"show:</td>",
"show:<td>",
"show:__role__",
"show:</td>",
"show:</tr>",
"after_show:</tbody></table>"
);