{module_blogpostlist}

Description

Displays latest posts across a blog or displays the blog posts that are tagged with a specific tag.

Syntax

{module_blogpostlist render="item|collection" collection="my_custom_collection_name" template="/folder/template.tpl" blogId="24" rowCount="10" tag="tag"}

Note: When using named parameters always wrap the individual parameters in double quotes. Also, do note that modules using named parameters do not work for campaigns just yet.

Parameters

  • render - possible values are item or collection (the default is item). The render parameter indicates whether the template content is used to render a collection or to render a single item. Take a look at the render parameter's article for more details on how to use it
  • blogId - system generated, replace with -1 to render blog posts across all the blogs
  • rowCount - how many posts to display - the default is 10
  • tag - name of the tag you want ot display the posts for. If is empty all the posts will be listed.
  • collection - use this if you need to access the module's Liquid output tags
  • template - render the module using a custom template. You can leave the value of the template parameter blank to suppress the original output and use Liquid output tags instead

This module can be rendered using:

  • the blog list layout - on this layout you can use either the legacy tags or Liquid output tags. Here is a list of all the tags you can use: Blog list's reference page
  • your own custom layout - take a look at the custom templates article for more details
  • Liquid collections - here are the Liquid output tags you can use:
Liquid tag Legacy tag Description
{{type}} The Blog type ID (56)
{{author}} {tag_blogpostauthor}Author of the post
{{body}} {tag_blogpostbody}Details of the post
{tag_blogpostbodypreview,Text}Display a preview of the first paragraph of your blog post. Replace "Text" with the relevant words to link to see the entire post.
{{date}} - Use Liquid date switches to format the date {tag_blogpostdate}Date of the post
Use Liquid date switches to format the day {tag_blogpostday} Day of the post
Use Liquid date switches to format the month {tag_blogpostmonth} Month of the post
Use Liquid date switches to format the month {tag_blogpostmonthnumeric}Month part of the date the blog post was posted as a numeric value, e.g. 11-Dec-14 will render 12
{{title}} {tag_blogposttitle}The title of the post as an anchor linked to the permalink
{tag_blogposttitle_nolink}The title of the post
{{postFeaturedImage}} {tag_blogpostfeaturedimageurl} The featured image's URL of the blog post (relative to site root). e.g. /img/featured-1.jpg
Use Liquid date switches to format the year {tag_blogpostyear}Year part of the date that the post was submitted, e.g. 11-Dec-14 will render as the year only, like this: 2014
{{commentsCount}} {tag_commentcount}Number of comments for current post
{tag_commentlist} List of comments associated with this post.
This list is fully customizable, take a look at the Comment list layout for the list of parameters you can use to render the comments.
For additional information on how to render the output of this tag using Liquid take a look at the Enable other Liquid tags article.
{tag_commentrank}Rank of comments associated with this post
{tag_permalink}Link for Permalink with anchor
{tag_permalinkonly}Link for Permalink without anchor
{{trackbacksCount}} {tag_trackbackcount}Number of trackbacks for current post
{{trackbackUrl}} {tag_trackbacklink}Link for trackback
{tag_trackbacklist} List of trackbacks associated with this post.
For additional information on how to render the list of trackbacks using Liquid take a look at this article
{{id}} {tag_blogpostid} Displays the blog post's ID
{{authorPictureUrl}} {tag_blogpostauthorpictureurl} Will render the picture url (relative to site root). e.g. /images/profile.jpg
{tag_blogpostauthorpicture}Will render the full HTML image tag of the authors profile picture.
{{url}} {tag_itemurl_nolink}URL to the item being referred, without host
{tag_itemurl_withhost}URL to the item being referred, with host

Examples

  • {module_blogpostlist blogId=" 419" rowCount="1" tag="business "} - will display latest post in the blog with ID 419 where the tag is the word business
  • {module_blogpostlist blogId="419" collection="collection1" template=""} - in this case nothing will be displayed, however the module's Liquid tags will become available in the collection1 collection.

Syntax

{module_blogpostlist,ID,count,tag}

Parameters

  • ID - system generated, replace with -1 to render blog posts across all the blogs
  • count - how many posts to display - the default is 10
  • tag - name of the tag you want ot display the posts for. If is empty all the posts will be listed.

Layouts

Examples

  • {module_blogpostlist,419,1,business} - will display latest post in the blog with ID 419 where the tag is the word business