Hi,
Using Moodle 3.2.2.
To colour code breadcrumbs so the course breadcrumb is a different colour I've found I CAN achieve this simply by just adding this function (3 lines below) to lib\navigationlib.php, I can then call that function from the navbar.mustache template and depending on what it returns the breadcrumb can be a different colour. BUT in PROD environment we can't change anything that isn't in the /theme folder and navigationlib.php is in the higher up/lib folder.
So, is it possible to override/add to navigationlib.php from within the theme folder i.e. override it somehow with custom render or something?
For reference function I had to navigationlib.php is:
public function has_iscourse() {
if (preg_match('#course/view#', $this->action)) return (1);
}
and can call this from navbar.mustache:
{{#get_items}}
{{#has_action}}
{{#has_iscourse}}
<li class="breadcrumb-item"><a style="font-weight: bold;" href="{{{action}}}" {{#get_title}}title="{{get_title}}"{{/get_title}}>{{{text}}}</a></li>
{{/has_iscourse}}
{{^has_iscourse}}
<li class="breadcrumb-item"><a href="{{{action}}}" {{#get_title}}title="{{get_title}}"{{/get_title}}>{{{text}}}</a></li>
{{/has_iscourse}}
{{/has_action}}
{{^has_action}}
<li class="breadcrumb-item">{{{text}}}</li>
{{/has_action}}
{{/get_items}}
Any help much appreciated,
Thanks,
Alex