Not the breadcrumb trail again...

Re: Not the breadcrumb trail again...

by Helen Foster -
Number of replies: 2
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Here's a very simple interim hack for print_navigation (found in moodle\lib\weblib.php) that just removes the activity type link from the breadcrumb trail:

function print_navigation ($navigation) {
   global $CFG;
 
   if ($navigation) {
       if (! $site = get_site()) {
           $site->shortname = get_string("home");
       }

       $bits = explode('->', $navigation);
       if (count($bits) > 2) {
           array_splice($bits, 1, 1);
           $navigation = implode('->', $bits);
       }

       
       $navigation = str_replace('->', '»', $navigation);
       echo "<a target=\"{$CFG->framename}\" href=\"$CFG->wwwroot/\">$site->shortname</a> &raquo; $navigation";
   }
}


In reply to Helen Foster

Re: Not the breadcrumb trail again...

by N Hansen -
Hmm, now I'm not sure I like how this works. I just seems to remove the link, no matter whether it is an activity or not. For example, if someone views a particular participant from the participants link, then it removes the link to the all participants page. Considering how often my users like to view other participants, I think this is dangerous.