Hi
I like this theme
very modern and slick and heres the but! lol
I would like to remove the
My Home
Events
My Sites
I know i have to comment out in the renderers.php but when i comment out each 'tab' i end up with 2 home tabs. I just want 1 that returns to home page (frt)
Here is what i have done
public function navigation_menu() {
global $PAGE, $COURSE, $OUTPUT, $CFG;
$menu = new custom_menu();
if (isloggedin() && !isguestuser()) {
$branchtitle = get_string('home');
$branchlabel = '<i class="fa fa-home"></i> '.$branchtitle;
$branchurl = new moodle_url('/');
$branchsort = 9998;
$branch = $menu->add($branchlabel, $branchurl, $branchtitle, $branchsort);
/*$branchtitle = get_string('myhome');
$branchlabel = '<i class="fa fa-dashboard"></i> '.$branchtitle;
$branchurl = new moodle_url('/my/index.php');
$branchsort = 9999;
$branch = $menu->add($branchlabel, $branchurl, $branchtitle, $branchsort);*/
/* $branchtitle = get_string('events', 'theme_bcu');
$branchlabel = '<i class="fa fa-calendar"></i> '.$branchtitle;
$branchurl = new moodle_url('/calendar/view.php');
$branchsort = 10000;
$branch = $menu->add($branchlabel, $branchurl, $branchtitle, $branchsort);*/
/*$branchtitle = get_string('mysites', 'theme_bcu');
$branchlabel = '<i class="fa fa-briefcase"></i><span class="menutitle">'.$branchtitle.'</span>';
$branchurl = new moodle_url('/my/index.php');
$branchsort = 10001;*/ $branch = $menu->add($branchlabel, $branchurl, $branchtitle, $branchsort);
list($sortedcourses, $sitecourses, $totalcourses) = block_course_overview_get_sorted_courses();
if ($sortedcourses) {
foreach ($sortedcourses as $course) {
if ($course->visible) {
$branch->add(format_string($course->fullname), new moodle_url('/course/view.php?id='.$course->id),
format_string($course->shortname));
}
}
} else {
$noenrolments = get_string('noenrolments', 'theme_bcu');
$branch->add('<em>'.$noenrolments.'</em>', new moodle_url('/'), $noenrolments);
}
if (ISSET($COURSE->id) && $COURSE->id > 1) {
$branchtitle = get_string('thiscourse', 'theme_bcu');
$branchlabel = '<i class="fa fa-sitemap"></i><span class="menutitle">'.$branchtitle.'</span>';
$branchurl = new moodle_url('#');
$branch = $menu->add($branchlabel, $branchurl, $branchtitle, 10002);
$branchtitle = "People";
$branchlabel = '<i class="fa fa-users"></i>'.$branchtitle;
$branchurl = new moodle_url('/user/index.php', array('id' => $PAGE->course->id));
$branch->add($branchlabel, $branchurl, $branchtitle, 100003);
$branchtitle = get_string('grades');
$branchlabel = $OUTPUT->pix_icon('i/grades', '', '', array('class' => 'icon')).$branchtitle;
$branchurl = new moodle_url('/grade/report/index.php', array('id' => $PAGE->course->id));
$branch->add($branchlabel, $branchurl, $branchtitle, 100004);
$data = theme_bcu_get_course_activities();
foreach ($data as $modname => $modfullname) {
if ($modname === 'resources') {
$icon = $OUTPUT->pix_icon('icon', '', 'mod_page', array('class' => 'icon'));
$branch->add($icon.$modfullname, new moodle_url('/course/resources.php', array('id' => $PAGE->course->id)));
} else {
$icon = '<img src="'.$OUTPUT->pix_url('icon', $modname) . '" class="icon" alt="" />';
$branch->add($icon.$modfullname, new moodle_url('/mod/'.$modname.'/index.php',
array('id' => $PAGE->course->id)));
}
}
}
}
if (!empty($PAGE->theme->settings->enablehelp)) {
$branchtitle = "Help";
$branchlabel = '<i class="fa fa-life-ring"></i>'.$branchtitle;
$branchurl = new moodle_url($PAGE->theme->settings->enablehelp);
$branchsort = 10003;
$branch = $menu->add($branchlabel, $branchurl, $branchtitle, $branchsort);
}
return $this->render_custom_menu($menu);
}
public function tools_menu() {
global $PAGE;
$custommenuitems = '';
if (!empty($PAGE->theme->settings->toolsmenu)) {
$custommenuitems .= "<i class='fa fa-wrench'> </i>".get_string('toolsmenulabel', 'theme_bcu')."|#|".
get_string('toolsmenulabel', 'theme_bcu')."\n";
$arr = explode("\n", $PAGE->theme->settings->toolsmenu);
// We want to force everything inputted under this menu.
foreach ($arr as $key => $value) {
$arr[$key] = '-' . $arr[$key];
}
$custommenuitems .= implode("\n", $arr);
}
$custommenu = new custom_menu($custommenuitems);
return $this->render_custom_menu($custommenu);
}
regards
Gary