From 783823ad9d9aebc3db66ffab473dfa56b96543cb Mon Sep 17 00:00:00 2001 From: oleonard Date: Thu, 10 Feb 2005 19:34:59 +0000 Subject: [PATCH] Adding option to switch templates based in URL parameter. - print=page uses members/moremember-print.tmpl - print=slip uses members/moremember-receipt.tmpl - no print parameter uses default members/moremember.tmpl --- members/moremember.pl | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/members/moremember.pl b/members/moremember.pl index 77a3cee0cf..56c7a0cb14 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -48,9 +48,19 @@ use HTML::Template; my $dbh = C4::Context->dbh; my $input = new CGI; +my $print = $input->param('print'); +my $template_name; + +if($print eq "page"){ + $template_name = "members/moremember-print.tmpl"; +} elsif($print eq "slip"){ + $template_name = "members/moremember-receipt.tmpl"; +} else { + $template_name = "members/moremember.tmpl"; +} my ($template, $loggedinuser, $cookie) - = get_template_and_user({template_name => "members/moremember.tmpl", + = get_template_and_user({template_name => $template_name, query => $input, type => "intranet", authnotrequired => 0, -- 2.39.5