5 use C4::Output; # contains gettemplate
6 use C4::Interface::CGI::Output;
13 # find the script that called the online help using the CGI referer()
15 my $refer = $query->referer();
16 $refer =~ /.*koha\/(.*)\.pl.*/;
17 my $from = "help/$1.tmpl";
19 my $template = gethelptemplate($from,"intranet");
21 output_html_with_http_headers $query, "", $template->output;
28 $htdocs = C4::Context->config('intrahtdocs');
29 my ($theme, $lang) = themelanguage($htdocs, $tmplbase, "intranet");
30 unless (-e "$htdocs/$theme/$lang/$tmplbase") {
31 $tmplbase="help/nohelp.tmpl";
32 my ($theme, $lang) = themelanguage($htdocs, $tmplbase, "intranet");
34 my $template = HTML::Template->new(filename => "$htdocs/$theme/$lang/$tmplbase",
35 die_on_bad_params => 0,
37 path => ["$htdocs/$theme/$lang/includes"]);
39 # XXX temporary patch for Bug 182 for themelang
40 $template->param(themelang => '/intranet-tmpl' . "/$theme/$lang",
41 interface => '/intranet-tmpl',