1 package C4::Interface::CGI::Template;
5 # convenience package for HTML templating
6 # Note: This is just a utility module; it should not be instantiated.
9 # Copyright 2003 Katipo Communications
11 # This file is part of Koha.
13 # Koha is free software; you can redistribute it and/or modify it under the
14 # terms of the GNU General Public License as published by the Free Software
15 # Foundation; either version 2 of the License, or (at your option) any later
18 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
19 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
20 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
22 # You should have received a copy of the GNU General Public License along with
23 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
24 # Suite 330, Boston, MA 02111-1307 USA
29 use vars qw($VERSION @ISA @EXPORT);
31 # set the version for version checking
36 C4::Members - Convenience functions for using HTML::Template
40 use C4::Interface::HTML::Template;
44 The functions in this module peek into a piece of HTML and return strings
45 related to the (guessed) charset.
55 &expand_sex_into_predicate
58 =item expand_sex_into_predicate
60 $data{&expand_sex_into_predicate($data{sex})} = 1;
62 Converts a single 'M' or 'F' into 'sex_M_p' or 'sex_F_p'
65 In some languages, 'M' and 'F' are not appropriate. However,
66 with HTML::Template, there is no way to localize 'M' or 'F'
67 unless these are converted into variables that TMPL_IF can
68 understand. This function provides this conversion.
72 sub expand_sex_into_predicate ($) {
74 return "sex_${sex}_p";
75 } # expand_sex_into_predicate
77 #---------------------------------
79 END { } # module clean-up code here (global destructor)
88 Koha Developement team <info@koha.org>