{module_forum}

Description

Displays a list of forums.

Syntax

{module_forum render="item|collection" filter="item(individual)/all/classified/latestClassified/random/latest/randomClassified" itemid="newsId or classificationId" noTemplate="true" targetFrame="_self" 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)
  • noTemplate – if you want to force the item not to use a site-level template when displayed pass in true, otherwise leave empty
  • targetFrame - the frame in which to open the item in
  • collection - use this if you need to access the module's Liquid output tags
  • template - optional, for this module this can either represent the path of the custom template you want to use, or use a blank value (template="") if you need to suppress the original output and use Liquid output tags instead

This module can be rendered using:

  • the 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 the Forum layout 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 Description
{{expiryDate}} Expiry date of the forum
{{description}} Description of the forum
{{lastPostAuthor}} Name (alias) of the person who last posted to the forum
{{lastPostDate}} Date and time of the last post in the forum
{{name}} Name of forum in plain text.
{{totalPosts}} Total number of the posts in forum
{{totalTopics}} Total number of topics in forum
{{totalViews}} Total number of times topics of the forum have been viewed
{{lastUpdateDate}} Last update date of the forum by an administrator. The date is in this format - 27-Mar-2013
{{releaseDate}} Release date of the forum

Examples

  • {module_forum filter="item" itemid="317" targetFrame="_blank"} - it will display an individual forum with an id of 317 and it will display it in the new frame
  • {module_forum filter="all" template="/layouts/custom/individual_forum.tpl"} - it will display all the forums on the site using the individual_forum.tpl custom template
  • {module_forum filter="item" itemid="317" 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_forum,filter,ID,targetFrame}

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)
  • targetFrame - the frame in which to open the item in

Layouts

Examples

  • {module_forum,i,317,_blank} - it will display an individual forum with an id of 317 and it will display it in the new frame
  • {module_forum,a, template="/layouts/custom/individual_forum.tpl"} - it will display all the forums on the site using the individual_forum.tpl custom template