[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface loncommon.pm

raeburn raeburn at source.lon-capa.org
Mon Jan 30 11:19:17 EST 2017


raeburn		Mon Jan 30 16:19:17 2017 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	loncommon.pm 
  Log:
  - For 2.11
    - Backport 1.1272 (part).
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1075.2.122 loncom/interface/loncommon.pm:1.1075.2.123
--- loncom/interface/loncommon.pm:1.1075.2.122	Mon Jan 23 21:28:37 2017
+++ loncom/interface/loncommon.pm	Mon Jan 30 16:19:16 2017
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1075.2.122 2017/01/23 21:28:37 raeburn Exp $
+# $Id: loncommon.pm,v 1.1075.2.123 2017/01/30 16:19:16 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -8078,6 +8078,8 @@
              no_auto_mt_title -> prevent &mt()ing the title arg
              bread_crumbs ->             Array containing breadcrumbs
              bread_crumbs_component ->  if exists show it as headline else show only the breadcrumbs
+             bread_crumbs_nomenu -> if true will pass false as the value of $menulink
+                                    to lonhtmlcommon::breadcrumbs
              group          -> includes the current group, if page is for a
                                specific group
 
@@ -8143,12 +8145,18 @@
                 if (@advtools > 0) {
                     &Apache::lonmenu::advtools_crumbs(@advtools);
                 }
-
+                my $menulink;
+                # if arg: bread_crumbs_nomenu is true pass 0 as $menulink item.
+                if (exists($args->{'bread_crumbs_nomenu'})) {
+                    $menulink = 0;
+                } else {
+                    undef($menulink);
+                }
 		#if bread_crumbs_component exists show it as headline else show only the breadcrumbs
 		if(exists($args->{'bread_crumbs_component'})){
-			$result .= &Apache::lonhtmlcommon::breadcrumbs($args->{'bread_crumbs_component'});
+			$result .= &Apache::lonhtmlcommon::breadcrumbs($args->{'bread_crumbs_component'},'',$menulink);
 		}else{
-			$result .= &Apache::lonhtmlcommon::breadcrumbs();
+			$result .= &Apache::lonhtmlcommon::breadcrumbs('','',$menulink);
 		}
     } elsif (($env{'environment.remote'} eq 'on') &&
              ($env{'form.inhibitmenu'} ne 'yes') &&




More information about the LON-CAPA-cvs mailing list