Blogs API

Last edited: 5/26/2016

Display Mode: Auto

Depending on the URL, auto will either produce a list of blogs, a list of blog entries for a particular blog or a single entry. See the blog howto page for more information on this.

Display Mode: List

Depending on the parameters of the monklet or getContent, 'list' will produce either a list of blogs or a list of entries. See the blog howto page for more information on this.

Display Mode: Cloud

This will display a tag cloud consisting of all the tags used for a blog.

Parameters

All parameters apply to the entries list page.

name

Only for display:list and cloud, will display a list of entries for that blog. Use name:none to get a list of all blogs. Use name:all to get a list of posts from all blogs. Multiple blogs can be specified if separated by a comma.

Example:

"name:blog-title-slug",

"name:blog-slug1,blog-slug2",

"name:all",

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_category

Only show items assigned to that category. Limited to one category.

Example:

"find_category:category-slug",

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_author

Only show items assigned to that author.

Example:

"find_author:author-slug",

find_authors

Displays a list of authors for a blog. Uses  show_authorlist tags.

example:

"find_authors:yes",

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",

order

Sets sort order of items in list

item description
recent by date, starting with most recent
title by entry title, alphabetically
groupby

Sets a criteria to group the list by. If you leave out all show tags, this will produce an unordered list (<ul>) with the relevant titles as the list items (<li>). With recent, it will show the last 5 entries (can be changed with "howmany"). Otherwise, if group_show_postlist tags are present, those will be used.

Available grouping criteria:

  • author
  • category
  • month
  • group
  • recent (only without group_show_postlist tags)

Examples:

getContent(
"blog",
"display:list",
"groupby:author"
); 

getContent(
"blog",
"display:list",
"groupby:author",
"group_show_postlist:<h4>__title__</h4>",
); 

tagmin

Only for display:cloud. Will only display tags that have been used X amount of times.

Example:

"tagmin:3",

link

This will set a custom link path when using display:cloud. This should only be used when making a tag cloud of tags from multiple blogs. If the tag cloud is only from one blog, the links will automatically go to "/blog-slug/tag/tag-slug/"

Example:

getContent(
  "blog",
  "display:cloud",
  "link:blog-tags"
); 

URL Parameters 

All URL based parameters require display:auto

http://www.site.com/blog-slug/entry-slug/

This will display a detail page for an entry. "show_detail" tags will be used.

http://www.site.com/blog-slug/

This will display a list of entries for the blog. "before_show_postlist","show_postlist", and "after_show_postlist" tags will be used.

http://www.site.com/anything-other-than-a-blog-slug/

On any other page a list of blogs will be shown. "show_bloglist" tags will be used.

http://www.site.com/blog-slug/archive/11-2007/

Will display all entries from that month and year

http://www.site.com/blog-slug/category/category-slug/

Will display all entries from that category.

http://www.site.com/blog-slug/author/author-slug/

Will display all entries from that author.

http://www.site.com/blog-slug/authors/

Will display all list of authors for a blog. Uses "show_authorlist".

API

Blogs List 

If no blog is specified in the URL or through "name", show_bloglist tags are used.

show_bloglist
Tag Description
__blogtitle__ Title of the Blog
__blogdescription__ Description of the Blog
__blogtitlelink__ Produces /blog-slug/
__bloglastpost__ A link to the latest entry for this blog
__bloglastposttext__ The complete text of the latest entry
__group__ A comma separated list of groups assigned to the blog
__groupslug__ A comma separated list of groups slugs assigned to the blog
__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'__

__blogrss__ The URL of the RSS feed for this blog
Any Custom Fields setup for Blogs will output their API tags

Blog Detail / Entry List

If the URL or 'name' specifies a blog, the following tags are available.

before_show_postlist, after_show_postlist

The same tags are available for before_show_postlist and after_show_postlist.

Tag Description
__blogtitle__ Title of the Blog
__blogdescription__ Description of the Blog
__blogslug__ Slug for the blog
__group__ A comma separated list of groups assigned to the blog
__groupslug__ A comma separated list of groups slugs assigned to the blog
__blogrss__ The URL of the RSS feed for this blog
__blogcategory__ If find_category is used, displays that category
__pagination__ Divides the records into smaller groups and provides links to navigate through them
__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.
THE FOLLOWING TAGS ARE ONLY AVAILABLE FOR DETAIL OR IF find_author IS USED IN LIST MODE.
__blogauthor__ Author tags are only available if find_author or /blog-slug/author/author-slug/ is used.

Displays the name of the author
__blogauthorslug__ The slug of the author
__blogauthorcount__ The number of posts for that author
__blogauthorimage__ The image for that author
__blogauthorbio__ The bio for that author
__blogauthorextrainfo__ The text from the author's "additional info" field
__blogauthorusername__ The username of the author
Any Custom Fields setup for Blogs will output their API tags
group_show_postlist
Tag Description
__title__ The title of whatever we are grouping by
__slug__ The slug of whatever we are grouping by
show_authorlist

If find_authors or /blog-slug/authors/ is used. show_postlist tags will not be available if show_authorlist tags are used.

Tag Description
__blogauthor__ Displays the name of the author
__blogauthorslug__ The slug of the author
__blogauthorcount__ The number of posts for that author
__blogauthorimage__ The image for that author
__blogauthorbio__ The bio for that author
__blogauthorextrainfo__ The text from the author's "additional info" field
__blogauthorusername__ The username of the author
show_postlist
Tag Description
__blogtitle__ The title of the blog
__blogslug__ The slug of the blog
__blogtext__ The full text of the blog post
__blogposttitle__ The title of the entry
__blogpostslug__ The slug of the title
__blogtitlelink__ Produces /blog-slug/entry-slug/
__blogpostdate__ Formattable date. Use __blogpostdate format='j/m/Y'__ a complete list of tags is available
__blogpostdate2__ Second formattable date
__blogsummary__ The summary of the blog post.
__blogauthor__ Author of the blog
__blogauthorslug__ The slug of the author
__blogauthorusername__ The username of the author
__preview__ A shortened version of the text or summary if available. HTML is stripped. Defaults to be no more than 250 characters. Can be specified with __preview limit='120'__.
__blogcommentNumber__ Formatted 'Comments(1)'
__blogcommentNumberonly__ Just the number of comments
__tags__ Comma separated list of tags for the post
__taglinks__ A list of tags as links. Use __taglinks url='blogs/tags/'__ to modify path. Defualts to '/blogslug/tags/'
__category__ The category assigned to the entry
__categoryurl__ Produces '/blog-slug/category/category-slug/
__categorylinks__ A list of categories as links. Use __categorylinks url='blogs/categories/' separator=' - '__ to modify path and the separator. Defaults to '/blogslug/category/' and ', '.
__blogemail__ Produces a mailto link with a link to the the entry in the message body. 
__blogpostpermalink__ The permanent link to the entry
__image__ The image in an img tag
__imageurl__ The url of the image
__image2__
__imageurl2__
__image3__
__imageurl3__
__imagetmb__ Thumbnail of the image in an img tag
__imagetmburl__ The url of the thumbnail
Any Custom Fields setup for Blog Posts will output their API tags

Entry Detail

If the URL specifies a blog and an entry the following tags are available.

show_detail
Tag Description
__blogtitle__ The title of the blog
__blogslug__ The slug of the blog
__blogtext__ The description of the blog
__blogsummary__ Summary of the post
__blogrss__ The URL of the RSS feed for this blog
__blogposttitle__ The title of the entry
__blogposttitleslug__ The slug of post title
__blogpostdate__ Formattable date. Use __blogpostdate format='j/m/Y'__ a complete list of tags is available
__blogpostdate2__ Second formattable date.
__blogauthor__ Author of the blog
__blogauthorslug__ The slug of the author
__blogauthorusername__ The username of the author
__blogauthorimage__ The image for that author
__blogauthorbio__ The bio for that author
__blogauthorextrainfo__ The text from the author's "additional info" field
__blogcommentNumber__ Formatted 'Comments(1)'
__blogcommentNumberonly__ Just the number of comments
__blogcommentList__ A preformatted list of comments
__loginlink__ Use __loginlink linktext='Login'__ to change detault text
__tags__ Comma separated list of tags for the post
__taglinks__ A list of tags as links. Use __taglinks url='blogs/tags/'__ to modify path. Defualts to '/blogslug/tags/'
__category__ The category assigned to the entry
__categoryurl__ Produces '/blog-slug/category/category-slug/
__categorylinks__ A list of categories as links. Use __categorylinks url='blogs/categories/' separator=' - '__ to modify path and the separator. Defaults to '/blogslug/category/' and ', '.
__blogpostpermalink__ Preformatted list of comments with text box to add new comments
__image__ The image in an img tag
__imageurl__ The url of the image
__image2__
__imageurl2__
__image3__
__imageurl3__
__imagetmb__ Thumbnail of the image in an img tag
__imagetmburl__ The url of the thumbnail
Any Custom Fields setup for Blog Posts will output their API tags

before_show_comments, after_show_comments

TagDescription
__loginlink__ Use __loginlink linktext='Login'__ to change detault text
__commentNumber__ Formatted 'Comments(1)'
__commentNumberonly__ Just the number of comments

show_thanks_comments

Sets the message that appears after a comment is left. There are no tags for the thanks message.

show_comments

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