Events API

by Justin Bodeutsch, Skyler Katz | Last edited: 10/20/2017

 

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 "/events/EventID-YYYY-MM-DD-slug"
__urltime__ The time will be included in the url. Useful if you have multiple events on the same day with the same name. "/events/YYYY-MM-DD-HH-MM" (year, month, day, hour, minute).
__urlshort__ looks like "/events/YYYY-MM-DD-slug"
__urlid__ looks like "/events/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__ the slug of the first category returned
__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.
__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__ number for the month
__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.
__import__ returns the URL of an ICS file representing the event
__imageurl__ The URL of the image 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
__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
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
__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
__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",

    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"

    howmany

    Sets the maximum number of items to display

    Example:

    "howmany:3",

    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
    • latest (will show later events first, recommended to use startdate and enddate with this).

    Example:

    "order:cost",

    Display mode: detail

    Show

    show

    Here are the tags available to show in event detail:

    Tag Description
    __title__ outputs the sermon title
    __slug__ the URL safe version of the title (more info)
    __url__ looks like "/events/slug"
    __description__  
    __summary__  
    __group__ comma separated list of group names
    __category__ comma separated list of categories
    __categoryslug__ slug of the first category returned
    __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.
    __cost__ the cost of the event in dollars
    __website__  
    __fulladdress__ The full address with standard formating
    __location__ The title of the location
    __locationslug__ The slug of the location
    __city__ The city of the location
    __state__ The state of the location
    __longitude__ The longitude of the location
    __latitude__ The latitude 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
    __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)
    __commentList__ displays a preformatted list of comments with a text box for new comments
    __eventstart__ formattable date/time. Use __eventstart format='j/m/Y'__ a complete list of tags is available
    __eventstartTwo__ second formattable date/time
    __eventstartThree__ third formattable date/time
    __eventend__ formattable end date/time. will output nothing if event repeats indefinitely (helpful for date content).
    __eventendtime__ formattable end date/time. will output event end time for events that repeat indefinitely (helpful for time content).
    __eventtimes__ smart display of event start/end times
    __attendance__ the attendance limit
    __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.
    __import__ returns the URL of an ICS file representing the event
    __imageurl__ The URL of the image of the event
    __googlemap__ See Google Maps how to
    Any Custom Fields setup for Events will output their API tags

    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

    When the event title is shown, include the start time after the title of the event. A dash is added after the event along with the hour, minute and AM/PM. If an event is an all day event, 'All Day' is shown.

    Example:

    "event_title_show_time:yes",

    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 of the li items around the event titles. Two options are available:

    1. group: class will be set to the slug of a group the event is assigned to.
    2. 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",

    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:YAAAA",
     //   "find_category:ladies",
        "show:<h3>__title__</h3>",
        "show:__email__ ~~ ",
        "show:__slug__",
        "nocache"
      );
     

     

      getContent(
        "event",
        "display:groups",
        "hide_private:yes",
        "find_category:men",
        "show:<h3>__title__</h3>"
      );

    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__",
    );