Hi,
I am trying to modify the default breadcrumbs of Moodle.
Specifically, I would like to remove all the elements that are not clickable. For example these ones.
I've found this function in outputrenderers.php but I don't know if it's related with this.
Could you help me with that ?
Thanks!
protected function render_breadcrumb_navigation_node(breadcrumb_navigation_node $item) {
if ($item->action instanceof moodle_url) {
$content = $item->get_content();
$title = $item->get_title();
$attributes = array();
$attributes['itemprop'] = 'url';
if ($title !== '') {
$attributes['title'] = $title;
}
if ($item->hidden) {
$attributes['class'] = 'dimmed_text';
}
if ($item->is_last()) {
$attributes['aria-current'] = 'page';
}
$content = html_writer::tag('span', $content, array('itemprop' => 'title'));
$content = html_writer::link($item->action, $content, $attributes);
$attributes = array();
$attributes['itemscope'] = '';
$attributes['itemtype'] = 'http://data-vocabulary.org/Breadcrumb';
$content = html_writer::tag('span', $content, $attributes);
} else {
$content = $this->render_navigation_node($item);
}
return $content;
}