{module_blog}

Description

Displays the list of blogs according to the blog list layout. Recommended use is to link directly to an individual blog rather than use the blog module. Use the Link Manager for Blog URL.

Syntax

{module_blog render="item|collection" filter="item" itemId="1" collection="my_custom_collection_name" template="/folder/template.tpl"}

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
  • filter - filtering criteria for display and can be one of the following:
    • item - individual item
    • all - all items
    • latest - latest items
    • latestClassified - latest items in a category
    • random - random item
    • randomClassified - displays a random item in a particular category
    • classified - all the items in a category
  • itemId- system generated (do not change), this is the blog item's ID
  • 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
{{title}} {tag_blogtitle}Name of the blog (with a link to the blog)
{tag_blogtitle_nolink}Name of the blog (without a link)
{{counter}} {tag_counter}Incremental count of the item on the page
{{description}} {tag_description}Description of the blog
{{expiryDate}} {tag_expirydate}Expiry date of blog in this format: "9999-01-01"
{{lastPostDate}} {tag_lastpostdate}Last post date of blog
{{lastUpdateDate}} {tag_lastupdatedate}Last update date of blog
{{releaseDate}} {tag_releasedate}Release date of blog in this format - "2014-08-02"
{{totalPosts}} {tag_totalposts}Total number of the posts in blog
{{url_withhost}} {tag_itemurl_withhost} URL to the item referred, with host
{tag_itemurl_nolink} URL to the item referred, without host

Examples

  • {module_blog filter="item" itemId="419"} - will display the individual blog with ID of 419
  • {module_blog filter="item" itemId="419" template="/layouts/template.tpl"} - will display the individual blog with ID of 419 using the template.tpl custom template
  • {module_blog itemId="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_blog,filter,ID}

Parameters

  • filter - filtering criteria for display and can be one of the following:
    • i - individual item
    • a - all items
    • l - latest items
    • r - random item
    • cr - displays a random item in a particular category
    • cl - latest items in a particular category
  • ID - system generated (do not change)

Layouts

Examples

  • {module_blog,i,419} - will display the individual blog with ID of 419