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. |
__articlelisturl__ | Gives the URL for the main article list. Defaults to /article if articles aren't set in the nav. |
__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. |
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 |
__articlelisturl__ | Gives the URL for the main article list. Defaults to /article if articles aren't set in the nav. |
__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 |
__seriestitlelink__ | a link to the series page |
__seriesurl__ | looks like "/series/series-slug/" |
__seriesslug__ | the slug of the series |
__seriesdescription__ | the description of the series |
__seriesimage__ | URL of the series' image |
__seriesimagethumb__ | URL of the series' image thumbnail |
__serieskeywords__ | comma separated list of series names |
__category__ | title of the category |
__categoryslug__ | |
__categoryselect__ | |
__categoryselectslug__ | |
__parentcategory__ | Comma separated list of parent categories of categories assigned to this article |
__categoryX__ | Will be repeated once for each category assigned |
__categoryXslug__ | |
__parentcategoryX__ | Will be repeated once for each parent category |
__parentcategoryXslug__ | |
__parentcategoryXchildX__ | Will be repeated once for each child category, nests under the parent category |
__parentcategoryXchildXslug__ | |
__date__ | formattable date/time. Use __date format='j/m/Y'__ a complete list of tags is available |
__author__ | the author(s) of the article |
__authortitlelinks__ | A comma separated list of links to the author page |
All author tags will be repeated for for each author. | |
__authorX__ | The name of the author |
__authorXslug__ | |
__authorXemail__ | Primary Email |
__authorXaltemail__ | Alternate Email (from user's profile). |
__authorXdesc__ | Pulled from the user's profile. |
__authorXextra__ | |
__authorXhomephone__ | |
__authorXcellphone__ | |
__authorXworkphone__ | |
__authorXaddress__ | |
__authorXbirthday__ | |
__authorXwebsite__ | |
__authorXrssfeed__ | |
__authorXflickr__ | |
__authorXfacebook__ | |
__authorXtwitter__ | |
__authorXpodcast__ | |
__authorXgallery__ | |
__authorXtags__ | |
__authorXimage__ | |
__authorXimagethumb__ | |
__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 |
__imageurl2__ | If a second image tag is needed with different parameters |
__imageurl3__ | If a third image tag is needed with different parameters |
__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 |
__videoembed__ | embed code for article's video if its an embed code filetype |
__videoembedurl__ | the source url of the video embed code |
__videourl__ | URL to the actual video file |
__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/'__ |
Any Custom Fields setup for Articles will output their API tags |
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__ | |
__rssfeed__ | |
__flickr__ | |
__facebook__ | |
__twitter__ | |
__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",
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_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",
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_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",
Only show items from that year. Example: "find_year:2009",find_year
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",
hide_date
Will not show items with dates in the past or future.
Examples:
"hide_date:past",
"hide_date:future",
order
Sets sort order of items in list
item | description |
---|---|
recent | by date, starting with the highest date. Dec 2023, Dec 2013, Nov 2013, July 2010, June 2010. |
oldest | by date, starting with the lowest date. June 2010, July 2010, Nov 2013, Dev 2013, Dec 2023. |
series | Orders articles based on what was specified on the article series edit page. |
series title | Orders articles based on the title of the assigned series. Helpful when grouping by series. |
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
- tag
- group
- month
- year
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
Parameters
find
Will accept the slug of an article.
Example:
"find:article-slug",
find_id
Will accept the ID of an article.
Example:
"find_id:769814",
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__",
);