Articles API
Display mode: list
Show
before_show, after_show
| Tag | Description |
|---|---|
| __pagination__ | Divides the records into smaller groups and provides links to navigate through them |
show
Here are the tags available to show in article list:
| Tag | Description |
|---|---|
| __title__ | outputs the article 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" |
| __text__ | |
| __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. |
| __descriptionpreview__ | Like __preview__ but always uses description even if summary is available. |
| __group__ | comma separated list of group names |
| __series__ | the title of the series for the article |
| __serieslink__ | a link to the series, anchor is "/series/series-slug/" with the series title as the text |
| __seriesurl__ | looks like "/series/series-slug/" |
| __seriesslug__ | the slug of the series |
| __seriesdescription__ | the description of the series |
| __category__ | title of the category |
| __categoryslug__ | |
| __categoryselect__ | |
| __categoryselectslug__ | |
| __parentcategory__ | Comma separated list of parent categories of categories assigned to this article |
| __date__ | formattable date/time. Use __date format='j/m/Y'__ a complete list of tags is available |
| __author__ | the author(s) of the article |
| All author tags can be repeated for multiple authors. Use __author1__, __author2__, __author1slug__, __author2slug__, etc. | |
| __author1__ | The name of the first author |
| __author1slug__ | |
| __author1email__ | |
| __author1desc__ | Pulled from the user's profile. |
| __author1extra__ | |
| __author1homephone__ | |
| __author1cellphone__ | |
| __author1workphone__ | |
| __author1address__ | |
| __author1birthday__ | |
| __author1website__ | |
| __author1rssfeed__ | |
| __author1flickr__ | |
| __author1podcast__ | |
| __author1gallery__ | |
| __author1tags__ | |
| __author1image__ | |
| __author1imagethumb__ | |
| __audio__ | the url of the audio |
| __audioplayer__ | creates a link to the popup audio player (more info) |
| __notes__ | url to the notes |
| __imageurl__ | the url to the image |
| __imagefilename__ | the filename of the image |
| __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 |
| __commentNumber__ | number of comments for that event. I.E. Comments(3) |
| __tags__ | A string of tags, comma separated |
| __taglinks__ | Comma separated list of keywords in links. Default links go to /articles/tag/tag-slug/. Otherwise use __taglinks url='/some/url/'__ |
group_show
| Tag | Description |
|---|---|
| __title__ | The title of the grouped content |
| __description__ | Only works with groupby:series and author |
| __slug__ | The slug of the grouped content. Will display 4-2008 for groupby:month |
| __image__ | The URL of the associated image. Only works with groupby:series, author |
| __imagethumb__ | The URL of the associated image thumb. Only works with groupby:series, author |
| The following tags only apply to groupby:author | |
| __extra__ | The extra information entered in the author's role record |
| __homephone__ | |
| __cellphone__ | |
| __workphone__ | |
| __address__ | |
| __birthday__ | |
| __website__ | |
| __ressfeed__ | |
| __flickr__ | |
| __gallery__ | |
| __podcast__ | |
| __tags__ | |
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",
howmanydays
Display items from the last X days.
Example:
"howmanydays:7",
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_author
Only show items assigned to that author.
Example:
"find_author:author-slug",
find_month
Only show items from that month.
Example:
"find_month:11-2007",
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",
hide_date
Will not show items with dates in the past or future.
Examples:
"hide_date:past",
"hide_date:future",
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 |
| series | Orders articles based on what was specified on the article series edit page. |
| random | returns a random list |
| title | by title, in alphabetical order |
groupby
Sets a criteria to group the list by.
Available grouping criteria:
- series
- category
- author
- month
Example:
"groupby:series",
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
The same tags are available for display:list and display:detail.
Parameters
find
Will accept the slug of an article.
Example:
"find:article-slug",
Display mode: cloud
Parameters
tagmin
Only for display:cloud. Will only display tags that have been used X amount of times.
Example:
"tagmin:3",
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__",
);