Hi All,
I'm a little perplexed with the core_renderer.
I've created a theme and in mustache files there is the line:
{{{ output.full_header }}}
As I understand this this is calling the function full_header() from lib/outputrenderers.php
To override this I had though I create a file called my_theme/classes/output/core_renderer.php
So far so good. The file contains...
namespace theme_my_theme\output;
use moodle_url;
defined('MOODLE_INTERNAL') || die;
class core_renderer extends \renderer_base {
public function full_header() {
global $PAGE;
$header = new stdClass();
$header->settingsmenu = $this->context_header_settings_menu();
$header->contextheader = $this->context_header();
$header->hasnavbar = empty($PAGE->layout_options['nonavbar']);
$header->navbar = $this->navbar();
$header->pageheadingbutton = $this->page_heading_button();
$header->courseheader = $this->course_header();
return $this->render_from_template('core/my_header', $header);
}
}
Yet this doesn't work, it seems to still call the function from lib/outputrenderers.php, rather than overriding it.
I'm sure I've done something blindingly wrong but I cannot see it.
Thanks in Advance,
Dave