5 include( 'elements/metasearch.html',
11 'title' => 'Page title',
13 #arrayref of hashrefs suited for passing to elements/search.html
14 #see that documentation
17 query => { 'table' => 'tablename',
18 #everything else is optional...
19 'hashref' => { 'f1' => 'value',
20 'f2' => { 'op' => '<',
25 'order_by' => 'ORDER BY something',
28 count_query => 'SELECT COUNT(*) FROM tablename',
31 query => 'table' => 'anothertablename',
32 count_query => 'SELECT COUNT(*) FROM anothertablename',
40 # some HTML callbacks...
41 'menubar' => '', #menubar arrayref
42 'html_init' => '', #after the header/menubar and before the pager
43 'html_form' => '', #after the pager, right before the results
44 # (only shown if there are results)
45 # (use this for any form-opening tag rather than
46 # html_init, to avoid a nested form)
47 'html_foot' => '', #at the bottom
48 'html_posttotal' => '', #at the bottom
49 # (these three can be strings or coderefs)
54 % foreach my $search ( @{$opt{search}} ) {
55 <% include('search.html',
66 #warn join(' / ', map { "$_ => $opt{$_}" } keys %opt ). "\n";
68 my $type = $cgi->param('_type') =~ /^(csv|\w*\.xls|select|html(-print)?)$/