'.
- '';
- # The last breadcrumb does not have a link, so handle it seperately.
+ $css_class ||= 'LC_breadcrumbs';
+
+ # Make the faq and bug data cascade
+ my $faq = '';
+ my $bug = '';
+ my $help = '';
+ # Crumb Symbol
+ my $crumbsymbol = '»';
+ # The last breadcrumb does not have a link, so handle it separately.
my $last = pop(@Crumbs);
- # The first one should be the course, I guess.
- if (exists($ENV{'request.course.id'})) {
- my $cid = $ENV{'request.course.id'};
- unshift(@Crumbs,{href=>'/adm/menu',
- title=>'Go to main menu',
- text=>$ENV{'course.'.$cid.'.description'},
- });
- }
- my $links .=
- join('->',
- map {
- ''.
- $_->{'text'}.''
- } @Crumbs
- );
- $links .= '->' if ($links ne '');
- $links .= ''.$last->{'text'}.'';
- if (exists($last->{'bug'})) {
- $links = &Apache::loncommon::help_open_bug($last->{'bug'}).$links;
- }
- if (exists($last->{'faq'})) {
- $links = &Apache::loncommon::help_open_faq($last->{'faq'}).$links;
- }
- $Str .= $links.' | ';
- if (defined($component)) {
- $Str .= ''.
- ''.$component.'';
- if (defined($component_help)) {
- $Str .=
- &Apache::loncommon::help_open_topic($component_help);
+ #
+ # The first one should be the course or a menu link
+ if (!defined($menulink)) { $menulink=1; }
+ if ($menulink) {
+ my $description = 'Menu';
+ my $no_mt_descr = 0;
+ if (exists($env{'request.course.id'}) &&
+ $env{'request.course.id'} ne '') {
+ $description =
+ $env{'course.'.$env{'request.course.id'}.'.description'};
+ $no_mt_descr = 1;
+ }
+ $menulink = { href =>'/adm/menu',
+ title =>'Go to main menu',
+ target =>'_top',
+ text =>$description,
+ no_mt =>$no_mt_descr, };
+ if($last) {
+ #$last set, so we have some crumbs
+ unshift(@Crumbs,$menulink);
+ } else {
+ #only menulink crumb present
+ $last = $menulink;
}
- $Str.= ' | ';
}
- $Str .= '