<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
</head>
<body>
Waylon Robertson wrote:<br>
<blockquote type="cite"
cite="mid63KESRMGGFKJHFQK7273JEWSXT2U2FE.3ec40845@genji">
<pre wrap="">16/05/03 01:54:03, paul POULAIN <a class="moz-txt-link-rfc2396E" href="mailto:paul.poulain@free.fr"><paul.poulain@free.fr></a> wrote:
Well.. incidently.. I know nothing about the template system.... and I know only english. Just want it in pre-template perl?
</pre>
</blockquote>
Fairly simple :<br>
the templates are stored in a specific file & path, and looks like :<br>
<small><tt><i><HTML><br>
<TMPL_VAR NAME=startmenuissue><br>
<p><br>
Each box needs to be filled in with fine,time to start charging,charging
cycle<br><br>
eg 1,7,7 = $1 fine, after 7 days, every 7 days.<p><br>
<br>
<table><br>
<tr bgcolor="white"><br>
<TMPL_LOOP NAME=firstrowloop><br>
<td><TMPL_VAR NAME=description></td><br>
</TMPL_LOOP><br>
</tr><br>
<form action=/cgi-bin/koha/updatecharges.pl method=post><br>
<TMPL_LOOP NAME=tablebodyloop><br>
<tr bgcolor="whitw"><br>
<td><TMPL_VAR NAME=description></td><br>
<TMPL_LOOP NAME=rowloop><br>
<td><input type=text name="<TMPL_VAR NAME=name>" value="<TMPL_VAR
NAME=value>" size=6></td><br>
</TMPL_LOOP><br>
</tr><br>
</TMPL_LOOP><br>
</table><br>
<br>
<input type=submit><br>
</form><br>
<br>
<TMPL_VAR NAME=endmenuissue><br>
<br>
</body><br>
</HTML></i></tt></small><br>
<br>
It's a mix of true HTML and H::T variables. The H::T are replaced during
execution by "true" value. The templates are managed by specific koha-subs,
that looks which one to use and check for auth : <br>
<i><small><tt><small>use strict;<br>
use CGI;<br>
use C4::Auth;<br>
use C4::Output;<br>
use C4::Interface::CGI::Output;<br>
use C4::Database;<br>
use HTML::Template;<br>
<br>
my $query = new CGI;<br>
my ($template, $loggedinuser, $cookie)<br>
= get_template_and_user({template_name => "parameters/admin-home.tmpl",<br>
query => $query,<br>
type => "intranet",<br>
authnotrequired => 0,<br>
flagsrequired => {parameters => 1},<br>
debug => 1,<br>
});<br>
<br>
output_html_with_http_headers $query, $cookie, $template->output;<br>
</small></tt></small></i><br>
Look at : <a class="moz-txt-link-freetext" href="http://html-template.sourceforge.net/html_template.html#tutorial">http://html-template.sourceforge.net/html_template.html#tutorial</a><br>
for a tutorial and some explanations.<br>
<br>
HTH<br>
<pre class="moz-signature" cols="$mailwrapcol">--
Paul POULAIN
Consultant indépendant en logiciels libres
responsable francophone de koha (SIGB libre <a class="moz-txt-link-freetext" href="http://www.koha-fr.org">http://www.koha-fr.org</a>)
</pre>
</body>
</html>