Sermons API
- Display mode: auto
- Display mode: list
- Display mode: detail Display mode: cloud
- Display mode: selector
- Display mode: categories
Display: auto
See the sermons overview to see how to setup sermons with display:auto. Also check out the global monklet 'All Sermons' to see a working example.
The same show tags and parameters are available with display:auto as with display:list and detail. To differentiate between them, show tags will need to be modified:
display:list
- before_show = before_show_list
- after_show = after_show_list
- group_show = group_show_list
- show = show_list
Display:detail
- show = show_detail
Display mode: list
Show
before_show, after_show
Here are the tags available to before_show and after_show in sermon list:
| Tag | Description |
|---|---|
| __pagination__ |
Divides the records into smaller groups and provides links to navigate through them |
| __headerdescription__ | Displays the description entered in the sermon settings page |
show
Here are the tags available to show in sermon list:
| Tag | Description |
|---|---|
| __title__ | outputs the sermon title |
| __slug__ | the URL safe version of the title (more info) |
| __titlelink__ | creates a link with the title as the text |
| __url__ | looks like "/article/slug" |
| __summary__ | |
| __preview__ |
A shortened version of the text. HTML is stripped. Defaults to be no more than 250 characters. Can be specified with __perview limit='120'__ Uses the description if no summary is available. |
| __passage__ | passage assigned to the sermon |
| __passageslug__ | A URL safe version of the passage |
| __passagelink__ | A full link to sermons with that passage. Creates two links, one to only the book and another to the book and verse |
| __passagebook__ | Just the book of the passage |
| __passagebooklink__ | A link to sermons with that book |
| __passagebookslug__ | A URL safe version of the book |
| __passageverse__ | The passage without the book |
| __passageverselink__ | A link to sermons with the same verse |
| __group__ | comma separated list of group names |
| __groupslug__ | slug of an associated group |
| __series__ | the title of the series for the article |
| __seriesslug__ | the slug of the series |
| __category__ | comma separated list of categories |
| __categoryslug__ | |
| __categorylinks__ |
comma separated list of linked categories. Use parameter 'path' to specify where links will go, default is '/sermons/category/'. Use 'separator' to use a different separator than comma. |
| __date__ | formattable date. Use __date format='j/m/Y'__ a complete list of tags is available |
| __dateTwo__ | formattable date |
| __dateThree__ | formattable date |
| __preacher__ | the preacher(s) of the preacher |
| __preacherslug__ | |
| __preacherdesc__ | the description of the preacher |
| __preacherImg__ | the image of the preacher in an img tag |
| __preacherImgThumb__ | thumbnail of the preacher image in an img tag |
| __preacherNum__ | number of sermons by that preacher |
| __audio__ | the url of the audio |
| __audioplayer__ | creates a link to the popup audio player (more info) |
| __notes__ | url to the notes |
| __image__ | the the image in an img tag |
| __imageurl__ | the url of the image |
| __imagetmb__ | thumbnail of the image in an img tag |
| __videoplayer__ | creates a link to the popup video player. Handles optional attributes: __videoplayer linktext='Watch This' width='480' height='400' __ (more info) |
| __video__ | url to the article's video |
| __videoflash__ | url to the flash version of the video when present |
| __id__ | system id of the article |
| __alt__ | returns 'alt' for every other line |
| __first__ | displays 'first' for the first record returned |
| __last__ | displays 'last' for the last record returned |
| __tags__ |
Comma separated list of keywords |
| __taglinks__ | Comma separated list of keywords in links. If using display:auto, URL will be added automatically. Otherwise use __taglinks url='/some/url/'__ |
| __featured__ | displays 'featured' if record is featured |
| __commentNumber__ | number of comments for that event. I.E. Comments(3) |
| __commentNumberonly__ | number of comments with no "Comments()" around it |
group_show
| Tag | Description |
|---|---|
| __title__ | the title of whatever we are grouping by |
| __description__ | Only applies to series, shows the description of the series |
| __slug__ | |
| __image__ | The URL of the associated image. Only works with groupby:series |
| __imagethumb__ | The URL of the associated image thumb. Only works with groupby:series |
| __categoryNum__ | if grouping by category, displays the numbers of sermons in this category |
| __subtitle__ | the title of whatever we are subgrouping by |
| __subdescription__ | |
| __subslug__ | |
| __subimage__ | The URL of the associated image. Only works with groupby:series |
| __subimagethumb__ | The URL of the associated image thumb. Only works with groupby:series |
| __preacher__ | if grouping by preacher, displays the name of the preacher |
| __preacherslug__ | |
| __preacherdesc__ | |
| __preacherImg__ | image of the preacher in an img tag |
| __preacherImgThumb__ | thumbnail image in an img tag |
| __preacherNum__ | number of sermons by that preacher |
| __thistitle__ | displays the title of the group on every iteration |
| __thisslug__ | displays the slug of the group on every iteration |
Parameters
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",
offset
Skips the first X records returned
Example:
"offset:1",
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",
find_group_type
Only show items assigned to groups of a certain type. Does not override find_group.
Example:
"find_group:Small Group",
find_series
Only show items assigned to that series. Can find multiple series with a comma separated list. Can return the "current" series with "find_series:current",
Example:
"find_series:series1,series2,series3",
hide_series
Will not show items assigned to that series. Will also work with current.
Example:
"hide_series:series-slug,series-slug2",
Example:
"hide_series:current",
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_preacher
Only show items assigned to that preacher.
Example:
"find_preacher:preacher-slug",
find_passage
Only show items covering this passage. Accepts book, book and chapter, book chapter and verse or spans of those. Dashes can optionally be used in place of spaces if being pulled from a URL.
Example:
"find_passage:Romans",
"find_passage:1-Corinthians",
"find_passage:1 Corinthians 5:1-6:13",
"find_passage:1 Corinthians 5-6",
"find_passage:1 Corinthians 5",
find_month
Only show items from that month.
Example:
"find_month:11-2007",
hide_date
Will not show items with dates in the past or future.
Examples:
"hide_date:past",
"hide_date:future",
find_tag
Finds all posts with that tag or tags. Spaces in tags should be replaced with a dash (-).
Example:
"find_tag:tag-slug,tag-slug2",
page
For pagination, in a getContent (not required for monklets) this parameter is a good idea to prevent the cache from getting 'stuck' on the first page. Using 'nocache' also works.
Example:
"page:".$_GET['page'],
querystring
For pagination, will add to the end of the querystring of the pagination links. Any existing items in the querystring will automatically be added to the pagination generated links querystring.
Example: "querystring:author=bob&category=bible"
order
Sets sort order of items in list
| item | description |
|---|---|
| recent | by date, starting with most recent |
| preacher | by first name, alphabetically |
| series | chronologically, by the most recent sermon in the series |
| series title | by series name, alphabetically |
| category | by category, alphabetically |
| title | by title, in alphabetical order |
groupby
Sets a criteria to group the list by.
Available grouping criteria:
- series
- category
- preacher
- month
- year
- passage
- auto*
Example:
"groupby:series",
If no show tags are used with a groupby, an unordered list will be output automatically. You must first setup sermons to work with display monklets for the links to work correctly.
* If groupby:auto is used and no show tags are present, a list will be output based on the URL parameters. If the user has selected to group the main sermon list by series, a list of series will be output in this list.
Monklet Example:
tag="sermon"
display="list"
groupby="category"
subgroupby
Sets a criteria to subgroup the list by. Requires "groupby" to be set
Available subgrouping criteria:
- series
- category
- preacher
- month
- year
- chapter (only if grouped by passage)
Example:
"groupby:year","subgroupby:month",
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",
Display mode: detail
Show
show
Here are the tags available to show in sermon list:
| Tag | Description |
|---|---|
| __title__ | outputs the sermon title |
| __slug__ | the URL safe version of the title (more info) |
| __titlelink__ | creates a link with the title as the text |
| __url__ | looks like "/article/slug" |
| __summary__ | |
| __passage__ | passage assigned to the sermon |
| __passageslug__ | A URL safe version of the passage |
| __passagelink__ | A full link to sermons with that passage. Creates two links, one to only the book and another to the book and verse |
| __passagebook__ | Just the book of the passage |
| __passagebooklink__ | A link to sermons with that book |
| __passagebookslug__ | A URL safe version of the book |
| __passageverse__ | The passage without the book |
| __passageverselink__ | A link to sermons with the same verse |
| __group__ | comma separated list of group names |
| __groupslug__ | slug of an associated group |
| __series__ | the title of the series for the article |
| __seriesslug__ | the slug of the series |
| __category__ | title of the category |
| __categoryslug__ | |
| __subcategory__ | the title of the child category |
| __subcategoryslug__ | |
| __categorylinks__ | comma separated list of linked categories. Use parameter 'path' to specify where links will go, default is '/sermons/category/'. Use 'separator' to use a different separator than comma. |
| __date__ | formattable date. Use __date format='j/m/Y'__ a complete list of tags is available |
| __preacher__ | the preacher(s) of the preacher |
| __preacherslug__ | |
| __preacherdesc__ | the description of the preacher |
| __preacherImg__ | the image of the preacher in an img tag |
| __preacherImgThumb__ | thumbnail of the preacher image in an img tag |
| __preacherNum__ | number of sermons by that preacher |
| __audio__ | the url of the audio |
| __audioplayer__ | creates a link to the popup audio player (more info) |
| __notes__ | url to the notes |
| __image__ | the the image in an img tag |
| __imageurl__ | the url of the image |
| __imagetmb__ | thumbnail of the image in an img tag |
| __videoplayer__ | creates a link to the popup video player. Handles optional attributes: __videoplayer linktext='Watch This' width='480' height='400' __ (more info) |
| __video__ | url to the article's video |
| __tags__ |
comma separated list of keywords |
| __taglinks__ | Comma separated list of keywords in links. If using display:auto, URL will be added automatically. Otherwise use __taglinks url='/some/url/'__ |
| __commentNumber__ | number of comments for that event. I.E. Comments(3) |
| __commentNumberonly__ | number of comments with no "Comments()" around it |
| __commentList__ | Preformatted list of comments with text box to add new comments |
Parameters
find
Will accept the slug of a sermon.
Example:
"find:sermon-slug",
Display mode: selector
If using display monklets / display:auto to handle sermons, a drop down can automatically be create to link to sermon lists with grouped content. See the sidebar of this site for an example: http://www.imagodeicommunity.com/information/sermons/.
| Tag | Description |
|---|---|
| __series__ |
|
| __month__ | |
| __category__ | |
| __preacher__ | |
| __passage__ | Links to sermons from each book of the Bible used. |
Monklet Example:
tag="sermon"
display="selector"
select="__series__ __month__ __category__ __preacher__ __passage__"
Display mode: cloud
This will display a list of tags with different classes assigned to each tag depending on the frequency the tag is used. These classes can be used to attach different sizes and/or colors to the most important tags. See Sermon Cloud for an example tag cloud.
If the semron location has been set in the nav, the links will go to example.com/sermon-url/tag/tag-slug/. Otherwise the links will take the user to example.com/sermons-about-tag-slug/.
Parameters
tagmin
Sets the miniumum number of times a tag must be used before it will appear in the tag cloud.
Example:
tagmin="3"The following styles were used for sermon cloud to size the cloud:
<style type="text/css">.tag0 {font-size: 10px;}
.tag1 {font-size: 12px;}
.tag2 {font-size: 16px;}
.tag3 {font-size: 21px;}
.tag4 {font-size: 26px;}
.tag5 {font-size: 30px;}
.tag6 {font-size: 32px;}
.tag7 {font-size: 34px;}
#cloud a{text-decoration: none;}</style>
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__",
);