Events API
- Display mode: list
- Display mode: detail
- Display mode: calendar
- Display mode: groups
- Display mode: categories
Display mode: list
Show
show
Here are the tags available to show in event list:
Tag | Description |
---|---|
__title__ | outputs the event title |
__slug__ | the URL safe version of the title (more info) |
__url__ | looks like "/event/EventID-YYYY-MM-DD-slug" |
__eventlisturl__ | Should match URL of page set as "System Default" for events in Pages > Navigation |
__urltime__ | The time will be included in the url. Useful if you have multiple events on the same day with the same name. "/event/YYYY-MM-DD-HH-MM" (year, month, day, hour, minute). |
__urlshort__ | looks like "/event/YYYY-MM-DD-slug" |
__urlid__ | looks like "/event/EventID-YYYY-MM-DD-slug", same as the default __url__ tag. |
__description__ | |
__summary__ | |
__preview__ | A shortened version of the text. HTML is stripped. Defaults to be no more than 250 characters. Can be specified with __preview limit='120'__ Uses the description if no summary is available. |
__group__ | comma separated list of group names |
__groupslug__ | slug of one group associated with event |
__category__ | comma separated list of categories |
__categoryslug__ | comma separated list of category slugs |
__categorylinks__ | comma separated list of linked categories. Use parameter 'path' to specify where links will go, default is '/events/category/'. Use 'separator' to use a different separator than comma. |
__categoryids__ | comma separated list of category ids |
__parentcategory__ | Comma separated list of parent categories of categories assigned to this event |
__parentcategoryslug__ | comma separated list of parent category slugs |
__parentcategorylinks__ | comma separated list of linked parent categories. Use parameter 'path' to specify where links will go, default is '/events/category/'. Use 'separator' to use a different separator than comma. |
__parentcategoryids__ | comma separated list of parent category ids |
__categoryX__ | Will be repeated once for each category assigned |
__categoryXslug__ | |
__categoryXlink__ | |
__categoryXid__ | |
__parentcategoryX__ | Will be repeated once for each parent category |
__parentcategoryXslug__ | |
__parentcategoryXlink__ | |
__parentcategoryXid__ | |
__parentcategoryXchildX__ | Will be repeated once for each child category, nests under the parent category |
__parentcategoryXchildXslug__ | |
__parentcategoryXchildXlink__ | |
__parentcategoryXchildXid__ | |
__cost__ | the cost of the event in dollars |
__website__ | |
__coordname__ | name of the event coordinator |
__coordemail__ | email address of the coordinator |
__coordaltemail__ | Alternate Email (from user's profile). |
__coordphone__ | phone number of the coordinator |
__coordcellphone__ | cell number of the coordinator |
__coordworkphone__ | work number of the coordinator |
__commentNumber__ | number of comments for that event. I.E. Comments(3) |
__modificationdate__ | The date that the event was last modified. |
__eventstart__ | formattable date/time. Use __eventstart format='j/m/Y'__ or optionally __eventstart format='j/m/Y' formatAllDay='j/m/Y'__ to specify a format to use on all-day event detail pages. A complete list of tags is available |
__eventstartTwo__ | second formattable date/time |
__eventstartThree__ | third formattable date/time |
__eventend__ | formattable end date/time. |
__eventendtime__ | additional formattable end date/time. |
__eventtimes__ | smart display of event start/end times (format parameter does not apply) |
__startday__ | number for the day of the month |
__startmonth__ | text for the month ("May") |
__first__ | displays 'first' for the first record returned |
__last__ | displays 'last' for the last record returned |
__featured__ | displays 'featured' if record is featured |
__id__ | The system ID number for this event |
__isrecurring__ | Returns a space (" ") if the event is recurring, and nothing if not. |
__isallday__ | Returns a space (" ") if the event is recurring, and nothing if not. |
__occurrenceid__ | The system ID for the specific occurrence of an event. Each occurrence of a reapeating event would have a unique ID. These IDs generally stay the same but are not guaranteed to. |
__registration linktext='RSVP'__ | displays a link to a popup which handles the registration process. Use the 'linktext' parameter to specify the text of the link. If no linktext is specified, 'RSVP' is used. If registration is full. the text 'Registration Full' is displayed. |
__registrationurl__ | The URL to the secure registration portal. Will return empty if registration is full, or not enabled. |
__externalregistrationurl__ | A URL for an external registration page associated to this event. |
__import__ | returns the URL of an ICS file representing the event |
__imageurl__ | The URL of the image for the event |
__notes__ | The URL to the note for the event |
__googlemap__ | See Google Maps how to |
__fulladdress__ | The full address with standard formating |
__location__ | The title of the location |
__locationslug__ | The slug of the location |
__roomids__ | The System IDs of the Room(s) |
__room__ | The title of the room(s) |
__roomslug__ | The slug of the room(s) |
__addressline1__ | The first line of the street address |
__addressline2__ | The second line of the street address |
__city__ | The city of the location |
__state__ | The state of the location |
__longitude__ | The longitude of the location |
__latitude__ | The latitude of the location |
__thirdpartyserviceid__ | The third party service id |
__thirdpartyid__ | The third party id |
The following tags pull data from branches using the same location as the event. | |
__locationwebsite__ | A website for the location |
__locationemail__ | Auto-formatted with js obfuscation from bots and placed in a mailto link |
__locationphone__ | Phone number of the location |
__locationdescription__ | A description of the location |
__locationcategory__ | Comma separated list of categories |
__locationcategoryslug__ | The slug of the first category returned |
__locationimageurl__ | The url of the image |
__locationpostal__ | Postal address if different from the physical address |
__locationgroup__ | Comma separated list of groups |
Any Custom Fields setup for Events will output their API tags |
before_show, after_show
Tag | Description |
---|---|
__eventlisturl__ | Should match URL of page set as "System Default" for events in Pages > Navigation |
__pagination__ | Divides the records into smaller groups and provides links to navigate through them |
__date__ | formattable start date/time |
__category__ | If using find_category, will display the proper names of the categories. If using find_parent_category it will return the proper names of the child categories associated with the event/parent. |
__categoryslug__ | The slug of the category above |
__totalpossible__ | The total number of records that would be returned if pagination, limit, and offset were not used. |
__totalreturned__ | The total number of records returned by this request. |
__googlemap__ | See Googe Maps how to |
The following tags are only effective with find_location | |
__fulladdress__ | The full address with standard formating |
__location__ | The title of the location |
__addressline2__ | The second line of the street address |
__city__ | The city of the location |
__state__ | The state of the location |
The following tags pull data from branches using the same location as the event. | |
__locationwebsite__ | A website for the location |
__locationemail__ | Auto-formatted with js obfuscation from bots and placed in a mailto link |
__locationphone__ | Phone number of the location |
__locationdescription__ | A description of the location |
__locationcategory__ | Comma separated list of categories |
__locationcategoryslug__ | The slug of the first category returned |
__locationimageurl__ | The url of the image |
__locationpostal__ | Postal address if different from the physical address |
__locationgroup__ | Comma separated list of groups |
group_show
Tag | Description |
---|---|
__title__ | will look like "November 15 2007" if grouped by day or "Novermber 2007" if by month |
__slug__ | will look like "November-15-2007" if grouped by day or "Novermber-2007" if by month |
__date__ | formattable date/time. Use __date format='j/m/Y'__ a complete list of tags is available |
__dateTwo__ | formattable date/time. Use __dateTwo format='j/m/Y'__ a complete list of tags is available |
__count__ | The number of items in this grouping |
The following tags are only effective with groupby:location | |
__fulladdress__ | The full address with standard formating |
__location__ | The title of the location |
__addressline2__ | The second line of the street address |
__locationslug__ | The slug of the location |
__city__ | The city of the location |
__state__ | The state of the location |
The following tags pull data from branches using the same location as the event. | |
__locationwebsite__ | A website for the location |
__locationemail__ | Auto-formatted with js obfuscation from bots and placed in a mailto link |
__locationphone__ | Phone number of the location |
__locationdescription__ | A description of the location |
__locationcategory__ | Comma separated list of categories |
__locationcategoryslug__ | The slug of the first category returned |
__locationimageurl__ | The url of the image |
__locationpostal__ | Postal address if different from the physical address |
__locationgroup__ | Comma separated list of groups |
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_id
Will find a specific event. If used with "display:list", will show all occurrences of that event. If a date is entered before the id, that occurrences will be used.
Example
"find_id:123456",
"find_id:2009-10-07-123456",
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_location
Finds a list of events in a given location, zip code, or country/state/city string. If city can't be found, a list of churches in the specified state are returned.
Example:
"find_location:location-slug",Example:
"find_location:98765",
Example:
"find_location:US|WA|Seattle",
find_state
Find a list of events in a given state.
Example:
"find_state:WA",
find_near
Find a list of events near another event. Uses the slug of the base event. Use 'radius' to specify how far to search, otherwise will display events in the same city.
Example:
"find_near:event_title_slug",
radius
Works with find_location and find_near. Will specifiy how many miles from the city center to do the search.
Example:
"radius:20",
features
Only show items published as featured.
Example:
"features",
Monklet Example:
features="features"
nonfeatures
Only show items not published as featured.
Example:
"nonfeatures",
Monklet Example:nonfeatures="nonfeatures"
page
Sets the page of results to display
Example:
"page:3",
howmany
Sets the maximum number of items to display
Example:
"howmany:3",
NOTE: Event lists will default to showing a max of 99 events, unless you include the howmany parameter. (The default limit can be reached very quickly, if there are many "repeat" events.)
howmanydays
Find items from the next X days. If neither howmanydays nor howmany are specified, the list will continue until every event has been listed once.
Example:
"howmanydays:10",
recurring
Decides if recurring events will be included in the list. Default is "yes".
Example:
"recurring:no",
repeatevent
If the list continues to a point when a recurring event would be listed again, repeatevents specifies if it will be shown. Default is "no".
Example:
"repeatevent:yes",
enablepast
Sets whether events that have concluded will be shown. Default is "no".
Example:
"enablepast:yes",
year/month/day
Returns all events for that year, month, or day.
Examples:
"year:2007","month:11","day:13",
"year:2007","month:11",
topLevelLink
Sets where event list pages will be on your site. Default is "events".
Example:
"topLevelLink:activities",
startdate
Will only show events that occur after this date. Format is flexible.
Example:
"startdate:12/7/07"
enddate
Will only show events that occur before this date. Format is flexible.
Example:
"enddate:12/17/07"
modifiedsince
Will only show events that have been modified since a given date.
"modifiedsince:1/15/2012",
groupby
Groups the events by day or month. Grouping by location can be a little intensive so using 'nocache' is not recommended. Performance will also increase if 'howmanydays' is used.
Examples:
"groupby:day",
"groupby:month",
"groupby:year",
"groupby:location",
showemptygroup
If grouping by location, will show each location even if it has no active events.
Example:
"showemptygroup:yes",
nocache
Prevents the output from being cached. Caching increases the speed of getContents considerably so this tag is not reccomended except for testing purposes, places where the output is random, events lists where the output is time sensitive, or context sensitve getContents. nocache does not apply to monklets.
example:
"nocache",
noecho
getConents default to 'print' the output. With noecho, you can assign the contents to a variable to be printed later. This is helpful if you have repeated content on a page.
example:
"noecho",
emailencode
By default email addresses in content areas are encoded with javascript. emailencode can disable this for all content areas in a getContent.
example:
"emailencode:no",
order
If order is used, a list of all events in the system will be shown including past events. Can be ordered by:
- name
- website
- cost
- latest (will show later events first, recommended to use startdate and enddate with this).
Example:
"order:cost",
Display mode: detail
Show
show
The same tags are available for and display:detail.
Parameters
style
Specify a custom stylesheet for the iframe to use.
Example:
"style:http://example.com/css/external.css",
find
Will accept either the plain slug or the date followed by slug. For example, an event titled "Weekly Activity" could be found with either "weekly-activity" or "2007-02-04-weekly-activity" assuming the start date is Feb. 4th 2007. The date options was added so that multiple events with the same title could be distinguised.
Display mode: Calendar
Parameters
headingletters
sets the number of letters in the day name at the top of the calendar. 4 or more will display the entire day name. Default is 1.
Example:
"headingletters:3",
topLevelLink
Sets where event list pages will be on your site. Default is "events".
Example:
"topLevelLink:activities",
eventdetaillink
Sets where event detail pages will be on your site. Default is "event".
Example:
"eventdetaillink:activity",
linkincludetime
The event links will include the time in them. Useful if you have multiple events with the same title in the same day.
Example:
"linkincludetime:yes",
linkincludeid
The event links will include the unique system id in them. Defaults to 'yes'.
Example:
"linkincludeid:no",
numberOfMonths
sets the number of months to display
Example:
"numberOfMonths:3",
scrollingMonths
display all months at once or one at a time. Default is 'yes'.
Example:
"scrollingMonths:no",
nextPrev
If scrollingMonths is 'yes', sets the character or image users will click to toggle the month. Default is "»,«", which displays "« »".
Examples:
"nextPrev:>,<",
"nextPrev:<img src='next.jpg' alt='next' />,<img src='next.jpg' alt='previous' />",
monthid
Sets the html id's of the tables for months. Required if more than one calendar is on a page.
Example:
"monthid:eventCal",
cookie
Sets the name of the cookie used to remember which month the user viewed. Required if more than one calendar is on a page.
Example:
"cookie:calcookie",
eventTitles
Sets where the list of each days events is placed. Options are 'inDay'. 'belowMonth', 'followMouse'. Default is none. To use 'followMouse', you must include the following javascript in the head section of the page: "document.write('<div id="traildiv"></div>');"
Example:
"eventTitles:inDay",
event_title_show_time
Include the start time of the event formatted with the hour, minute and AM/PM. If an event is an all day event, 'All Day' is shown. A dash is added between the event and the time. Options 'yes' and 'after' will include the start time after the title of the event and the option 'before' will include the start time before the title.
Example:
"event_title_show_time:yes",
"event_title_show_time:after",
"event_title_show_time:before",
eventTitlesXY
For "eventTitles:followMouse", sets how where the events box is in relation to the pointer. Default is '-170,0'.
Example:
"eventTitlesXY:5,5",
liclass
Sets the html class of the li
items around the event titles. Two options are available:
group
: class will be set to the slug of a group the event is assigned to.category
: class will be set to the slugs of all categories the event is assigned to.
Example:
"liclass:group",
features
Only show items published as featured.
Example:
"features",
Monklet Example:
features="features"
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_category
Will not show items assigned to that category.
Example:
"hide_category:category-slug,category-slug2",
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_location
Finds a list of events in a given location, zip code, or country/state/city string. If city can't be found, a list of churches in the specified state are returned.
Example:
"find_location:location-slug",Example:
"find_location:98765",
Example:
"find_location:US|WA|Seattle",
find_state
Find a list of events in a given state.
Example:
"find_state:WA",
startmonth
Start the calendar on a given month. Defaults to the current month. Does not work with past months.
Example:
"startmonth:4",
Next month:
$start=date('n')+1;
...
"startmonth:".$start,
startyear
Start the calendar on a given year, defaults to the current year.
Example:
"startyear:2010",
enablepast
Sets whether events that have concluded will be shown. Default is "no".
Example:
"enablepast:yes",
recurring
Decides if recurring events will be included in the list. Default is "yes".
Example:
"recurring:no",
repeatevent
If the list continues to a point when a recurring event would be listed again, repeatevents specifies if it will be shown. Default is "no".
Example:
"repeatevent:yes",
Display mode: Groups
This will display a list of groups which have events assigned to them.
show
show
Here are the tags available to show in group list:
Tag | Description |
---|---|
__title__ | outputs the group title |
__slug__ | the URL safe version of the title |
__email__ | the email address of the group coordinator |
__type__ | The type of group it is |
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",
hide_private
Private groups will not appear in the list. Default is to allow private groups to be listed.
Example:
"hide_private:yes",
Full Example:
getContent(
"event",
"display:groups",
"hide_private:yes",
"find_category:men",
"show:<h3>__title__</h3>"
);
Display mode: categories
Show
level#
Tag | Description |
---|---|
__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__",
);