--- loncom/interface/loncommon.pm 2006/04/14 20:16:02 1.337 +++ loncom/interface/loncommon.pm 2006/04/14 21:09:51 1.338 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.337 2006/04/14 20:16:02 albertel Exp $ +# $Id: loncommon.pm,v 1.338 2006/04/14 21:09:51 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2753,7 +2753,10 @@ Inputs: =item * $notopbar, if true, keep the 'what is this' info but remove the navigational links -=item * $bgcolor, used to override the bg coor on a webpage to a specific value +=item * $bgcolor, used to override the bgcolor on a webpage to a specific value + +=item * $notitle, if true keep the nav controls, but remove the title bar + =back @@ -2766,7 +2769,7 @@ other decorations will be returned. sub bodytag { my ($title,$function,$addentries,$bodyonly,$domain,$forcereg,$customtitle, - $notopbar,$bgcolor,$hidetitle)=@_; + $notopbar,$bgcolor,$notitle)=@_; $title=&mt($title); $function = &get_users_function() if (!$function); my $img=&designparm($function.'.img',$domain); @@ -2826,7 +2829,7 @@ END # Accessibility $bodytag.=&Apache::lonmenu::menubuttons($forcereg,$forcereg); - if (!$hidetitle) { + if (!$notitle) { $bodytag.='

LON-CAPA: '.$title.'

'; } return $bodytag; @@ -2879,7 +2882,7 @@ ENDROLE $forcereg=1; } my $titletable; - if (!$hidetitle) { + if (!$notitle) { $titletable = ''. @@ -2924,7 +2927,7 @@ ENDROLE # Explicit link to get inline menu my $menu='
 '.&mt('Switch to Inline Menu Mode').''; # - if ($hidetitle) { + if ($notitle) { return $bodytag; } return(< if true will start with a rather than + no_title -> if true the title bar won't be shown + skip_phases -> hash ref of + head -> skip the generation + body -> skip all generation =back @@ -3147,21 +3154,29 @@ sub start_page { } $env{'internal.start_page'}++; - my $result = - &Apache::lonxml::xmlbegin(). - &headtag($title,$head_extra,\%head_args).&endheadtag(); - if ($args->{'frameset'}) { - my $attr_string = &make_attr_string($args->{'force_register'}, - $args->{'add_entries'}); - $result .= "\n\n"; - } else { - $result .= - &bodytag($title, - $args->{'function'}, $args->{'add_entries'}, - $args->{'only_body'}, $args->{'domain'}, - $args->{'force_register'}, $args->{'body_title'}, - $args->{'no_nav_bar'}, $args->{'bgcolor'}); + my $result; + if (! exists($args->{'skip_phases'}{'head'}) ) { + $result.= + &Apache::lonxml::xmlbegin(). + &headtag($title,$head_extra,\%head_args).&endheadtag(); + } + + if (! exists($args->{'skip_phases'}{'body'}) ) { + if ($args->{'frameset'}) { + my $attr_string = &make_attr_string($args->{'force_register'}, + $args->{'add_entries'}); + $result .= "\n\n"; + } else { + $result .= + &bodytag($title, + $args->{'function'}, $args->{'add_entries'}, + $args->{'only_body'}, $args->{'domain'}, + $args->{'force_register'}, $args->{'body_title'}, + $args->{'no_nav_bar'}, $args->{'bgcolor'}, + $args->{'no_title'}); + } } + if ($args->{'js_ready'}) { $result = &js_ready($result); }