From f953c4a169f910fa076ece325fe0a84b5e46eb0d Mon Sep 17 00:00:00 2001 From: tipaul Date: Tue, 4 Mar 2003 17:49:50 +0000 Subject: [PATCH] adding "interface" parameter : /intranet-tmpl or /opac-tmpl --- C4/Output.pm | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/C4/Output.pm b/C4/Output.pm index ecccff96a7..33a5d2f63b 100644 --- a/C4/Output.pm +++ b/C4/Output.pm @@ -79,27 +79,28 @@ my $path = C4::Context->config('includes') || #--------------------------------------------------------------------------------------------------------- # FIXME - POD sub gettemplate { - my ($tmplbase, $opac) = @_; + my ($tmplbase, $opac) = @_; - my $htdocs; - if ($opac ne "intranet") { - $htdocs = C4::Context->config('opachtdocs'); - } else { - $htdocs = C4::Context->config('intrahtdocs'); - } + my $htdocs; + if ($opac ne "intranet") { + $htdocs = C4::Context->config('opachtdocs'); + } else { + $htdocs = C4::Context->config('intrahtdocs'); + } - my ($theme, $lang) = themelanguage($htdocs, $tmplbase); + my ($theme, $lang) = themelanguage($htdocs, $tmplbase); - my $template = HTML::Template->new(filename => "$htdocs/$theme/$lang/$tmplbase", + my $template = HTML::Template->new(filename => "$htdocs/$theme/$lang/$tmplbase", die_on_bad_params => 0, global_vars => 1, path => ["$htdocs/$theme/$lang/includes"]); - # XXX temporary patch for Bug 182 for themelang - $template->param(themelang => ($opac ne 'intranet'? '/opac-tmpl': '/intranet-tmpl') . "/$theme/$lang", - theme => $theme, + # XXX temporary patch for Bug 182 for themelang + $template->param(themelang => ($opac ne 'intranet'? '/opac-tmpl': '/intranet-tmpl') . "/$theme/$lang", + interface => ($opac ne 'intranet'? '/opac-tmpl': '/intranet-tmpl'), + theme => $theme, lang => $lang); - return $template; + return $template; } #--------------------------------------------------------------------------------------------------------- -- 2.39.5