{module_faq}

Description

Displays a list of FAQ items.

Syntax

{module_faq render="item|collection" filter="item" itemid="faqId" noTemplate="false" effect="ajax" targetFrame="blank" 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
  • effect – enter ajax if you want to take advantage of the latest web technologies for a better customer experience
  • 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: FAQ layout'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 Description
Add FAQ to favorites list. Optionally customize to display your own custom image for adding and removing. Here is an example - {tag_addtofavorites,<img alt="" src="/images/add.gif" />,<img alt="" src="/images/remove.gif" />}
For additional information on how to render the output of this tag using Liquid take a look at the Enable other Liquid tags article.
{{answer}} Answer for frequently asked question (editor content). This outputs the text of the FAQ.
{{counter}} Incremental count of the FAQ on the page.
{{expiryDate}} Expiry date of FAQ for example 16-Apr-2014 03:48 AM
{{lastUpdateDate}} Last update date of FAQ for example 16-Apr-2014 03:48 AM
{{question}} Frequently asked question (will not have hyperlink). This outputs the FAQ's title in plain text.
{{releaseDate}} Release date of FAQ in this format - 16-Sep-2014
Tell a friend about this FAQ. This outputs a link that when clicks opens up a popup that "Tell a Friend" form.

Examples

  • {module_faq filter="all" targetFrame="_parent"} - will display all FAQs and open them in parent frame.
  • {module_faq filter="all", template="/layouts/custom/faq.tpl"} - will display all FAQs using the faq.tpl custom template.
  • {module_faq filter="latest" itemid="5"} - will display the latest 5 FAQs.
  • {module_faq filter="random" noTemplate="true" effect="ajax" targetFrame="_blank"} - will open a random item in a new window and will not apply the template and will use the Ajax effect where the detailed content opens right underneath the FAQ name.
  • {module_faq filter="all" collection="collection1" template=""} - in this case nothing will be displayed, however the module's Liquid tags will become available in the collection1 collection.