faqextensions module for Contao
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
src Added log statements Nov 14, 2018
LICENSE Initial commit Dec 29, 2015
README.md Documentation Dec 29, 2015
composer.json changes Nov 13, 2018



faqextensions extends the FAQ module support in Contao. The extensions allow you to highlight very popular FAQ entries or your personal recommendations in the Contao frontend to make your FAQ section even better.

Extension of existing Data Container Arrays


The tl_faq dca has been extended with two new database fields.


viewcount adds an integer counter to each FAQ entry. Each time an entry will be viewed in the frontend, the counter is increased by 1 containing the abolute number of views for this FAQ entry. A new module Most frequently viewed FAQ list lists FAQ entries ordered by the number of their absolute view count to present the most viewed FAQ entries.

$GLOBALS['TL_DCA']['tl_faq']['fields']['viewcount'] = array(
	'sql'                     => "int(10) unsigned NOT NULL default '0'"


recommended is a boolean field that can be checked in the backend for each FAQ entry to mark it as recommended or important. A new module Recommended FAQ list lists all FAQ entries which are marked as recommended.

$GLOBALS['TL_DCA']['tl_faq']['fields']['recommended'] = array(
	'label'                   => &$GLOBALS['TL_LANG']['tl_faq']['recommended'],
	'exclude'                 => true,
	'filter'                  => true,
	'eval'                    => array('tl_class'=>'w50 m12'),
	'inputType'               => 'checkbox',
	'sql'                     => "char(1) NOT NULL default ''"



Most frequently viewed FAQ list

This module creates a list of the most frequently viewed FAQ entries. Only FAQ entries with a viewcountgreater 0 will be used to generate the list. You can limit the number of entries by entering an upper limit. The order of the FAQ entries is always descending by viewcount so the most fequently viewed entry is on top of the list.


Recommended FAQ list

This module creates a list of all FAQ entries marked as recommended. You can limit the number of list entries by entering an upper limit and you can set the sorter order for the entries to alphabetical by FAQ title or by creation date of the FAQ entry, both ascending and descending.