In OpenCart 3.0.2.0 the system/loader.php has this:
Code: Select all
// Template contents. Not the output!
$template = '';
// Trigger the pre events
$result = $this->registry->get('event')->trigger('view/' . $trigger . '/before', array(&$route, &$data, &$template));
Code: Select all
$template = new Template($this->registry->get('config')->get('template_engine'));
// Trigger the pre events
$result = $this->registry->get('event')->trigger('view/' . $trigger . '/before', array(&$route, &$data, &$template));
Why is it so hard to implement a proper view/*/before event? Please let us continue using a String $template argument which can take a modified template buffer from pre events, as in OC 3.0.2.0!