I can't understand how to implement hooks
I am trying to extend Contao's functions at the first time and don't clearly understand, how.
I've added this:
Code:
$GLOBALS['TL_HOOKS']['outputFrontendTemplate'][] = array('myoutput', 'myfunc');
Directly into index.php
Then I've made a file myoutput.php in the root of the site, placed there:
Code:
<?php
public function myfunc($strContent, $strTemplate)
{
$strContent = str_replace("a", "b", $strContent);
return $strContent;
}
?>
and got error
Code:
Fatal error: Could not load class changetags in .../system/functions.php on line 76
Where should I put the file?
Or I'm doing everything wrong?
Bookmarks