getFrontendModule

The getFrontendModule hook allows to manipulate the generation of the front end modules.

Available

from Contao 2.11.0-RC1.

Parameters

  1. Database_Result $objRow

    Database result of the front end module.

  2. string $strBuffer

    The generated front end module buffer.

Return Values

Return $strBuffer or your custom modification.

Example

<?php

// config.php
$GLOBALS['TL_HOOKS']['getFrontendModule'][] = array('MyClass', 'myGetFrontendModule');

// MyClass.php
public function myGetFrontendModule($objRow, $strBuffer)
{
    // Wrap all modules in an additional wrapper div
    return '<div class="module">' . $strBuffer . '</div>';
}

More information

References

See also

  • getContentElement – triggered when a content element is generated.
  • getArticle – tiggered when an article is generated.
  • getForm – triggered when a form is generated.
  • isVisibleElement – triggered when checking if an element should be visible in the front end or not.

results matching ""

    No results matching ""