Moodle 3.5.2 override renderer and show in template

Moodle 3.5.2 override renderer and show in template

by Szymon Frączyk . -
Number of replies: 0

Hello.

I started create a new theme and i have a problem.

When i want to show my output on my main site i dont know how to override this.I have a output from the main theme boost.

How can I override this?

i created a directory classes in my theme and core_renderer.php but i dont know what next.


in my config.php i have 

$THEME->rendererfactory = 'theme_overridden_renderer_factory';

and 

$THEME->layouts = [
// Most backwards compatible layout without the blocks - this is the layout used by default.
'base' => array(
'file' => 'columns2.php',
'regions' => array(),
),
'mydashboard' => array(
'file' => 'columns2.php',
),
when i go to columns2.php i have
<?php

$bodyattributes = $OUTPUT->body_attributes([]);


$templatecontext = [
'sitename' => format_string($SITE->shortname, true, ['context' => context_course::instance(SITEID), "escape" => false]),
'output' => $OUTPUT,
'bodyattributes' => $bodyattributes
];
echo $OUTPUT->render_from_template('theme_wetheme/columns2', $templatecontext);

and in my columns2.mustache i have

{{{ output.doctype }}}
<html {{{ output.htmlattributes }}}>
<head>
<title>{{{ output.page_title }}}</title>
<link rel="shortcut icon" href="{{{ output.favicon }}}" />
{{{ output.standard_head_html }}}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>

<body {{{ b }}}>





<div>
{{{ output.main_content }}}
</div>

{{{ output.standard_end_of_body_html }}}
</body>
</html>




Average of ratings: -