From 5c41d379cfc0e03172e61252dff236c8b818ab18 Mon Sep 17 00:00:00 2001 From: tonnesen Date: Fri, 10 May 2002 17:08:04 +0000 Subject: [PATCH] Starting to play with HTML::Template I'm going to work on the search interface instead of the circulation interface as the search interface is where my librarians want the most changes at the moment. --- html-template/search.pl | 17 +++++++++++++++++ html-template/searchresults.tmpl | 22 ++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100755 html-template/search.pl create mode 100644 html-template/searchresults.tmpl diff --git a/html-template/search.pl b/html-template/search.pl new file mode 100755 index 0000000000..91e4ed5932 --- /dev/null +++ b/html-template/search.pl @@ -0,0 +1,17 @@ +#!/usr/bin/perl -w +use HTML::Template; + +my $template = HTML::Template->new(filename => 'searchresults.tmpl', die_on_bad_params => 0); + +$template->param(PET => 'Allie'); +$template->param(NAME => 'Steve Tonnesen'); + + +$template->param(SEARCH_RESULTS => [ { barcode => '123456789', title => 'Me and My Dog', author => 'Jack London', dewey => '452.32' }, + { barcode => '153253216', title => 'Dogs in Canada', author => 'Jack London', dewey => '512.3' }, + { barcode => '163214576', title => 'Howling at the Moon', author => 'Jack London', dewey => '476' } + ] + ); + + +print "Content-Type: text/html\n\n", $template->output; diff --git a/html-template/searchresults.tmpl b/html-template/searchresults.tmpl new file mode 100644 index 0000000000..1ab220fdcb --- /dev/null +++ b/html-template/searchresults.tmpl @@ -0,0 +1,22 @@ + +Test Template + + +Testing +

+Pet's Name: +

+


+ + + + + + + + + +
BarcodeTitleAuthorDewey
+
+ + -- 2.39.5