esedic
10/2/2015 - 10:40 AM

Joomla plugin events inside template

Joomla plugin events inside template

<?php
$dispatcher = JEventDispatcher::getInstance();
$dispatcher->register('onAfterRender', 'CustomParser');

function CustomParser(){   
    $body = JResponse::getBody();   
    $body = str_replace('ABC', 'XYZ', $body);   
    JResponse::setBody($body);
}
?>

Joomla plugin events inside template