Waylon Robertson wrote:
16/05/03 01:54:03, paul POULAIN <paul.poulain@free.fr> wrote: Well.. incidently.. I know nothing about the template system.... and I know only english. Just want it in pre-template perl?
Fairly simple : the templates are stored in a specific file & path, and looks like : /<HTML> <TMPL_VAR NAME=startmenuissue> <p> Each box needs to be filled in with fine,time to start charging,charging cycle<br> eg 1,7,7 = $1 fine, after 7 days, every 7 days.<p> <table> <tr bgcolor="white"> <TMPL_LOOP NAME=firstrowloop> <td><TMPL_VAR NAME=description></td> </TMPL_LOOP> </tr> <form action=/cgi-bin/koha/updatecharges.pl method=post> <TMPL_LOOP NAME=tablebodyloop> <tr bgcolor="whitw"> <td><TMPL_VAR NAME=description></td> <TMPL_LOOP NAME=rowloop> <td><input type=text name="<TMPL_VAR NAME=name>" value="<TMPL_VAR NAME=value>" size=6></td> </TMPL_LOOP> </tr> </TMPL_LOOP> </table> <input type=submit> </form> <TMPL_VAR NAME=endmenuissue> </body> </HTML>/ 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 : /use strict; use CGI; use C4::Auth; use C4::Output; use C4::Interface::CGI::Output; use C4::Database; use HTML::Template; my $query = new CGI; my ($template, $loggedinuser, $cookie) = get_template_and_user({template_name => "parameters/admin-home.tmpl", query => $query, type => "intranet", authnotrequired => 0, flagsrequired => {parameters => 1}, debug => 1, }); output_html_with_http_headers $query, $cookie, $template->output; / Look at : http://html-template.sourceforge.net/html_template.html#tutorial for a tutorial and some explanations. HTH -- Paul POULAIN Consultant indépendant en logiciels libres responsable francophone de koha (SIGB libre http://www.koha-fr.org)
paul POULAIN <paul.poulain@free.fr> wrote:
Look at : http://html-template.sourceforge.net/html_template.html#tutorial for a tutorial and some explanations.
I suspect some judicious use of TMPL_IF and TMPL_ELSE could let the menu bar be generated from a single template, but that needs the templater calls to have a parameter saying which menu bar tab to activate. Is there any problem with adding such a parameter? -- MJR/slef My Opinion Only and possibly not of any group I know. http://mjr.towers.org.uk/ jabber://slef@jabber.at Creative copyleft computing services via http://www.ttllp.co.uk/ Thought: "Changeset algebra is really difficult."
MJ Ray wrote:
paul POULAIN <paul.poulain@free.fr> wrote:
Look at : http://html-template.sourceforge.net/html_template.html#tutorial for a tutorial and some explanations.
I suspect some judicious use of TMPL_IF and TMPL_ELSE could let the menu bar be generated from a single template, but that needs the templater calls to have a parameter saying which menu bar tab to activate. Is there any problem with adding such a parameter?
That's an idea I had a few time ago. Another solution would be to have a "generic" style sheet, and a little specific with only the differing menu. For example : style.css defines admin, acqui, about, circ... acqui.css defines only acqui. In every acquisition template : <include name="style.css"> <include name="acqui.css"> css RFP specifies that the last definition of a style is the active one. The advantage of such a solution is that it does nothing in perl scripts. -- Paul POULAIN Consultant indépendant en logiciels libres responsable francophone de koha (SIGB libre http://www.koha-fr.org)
paul POULAIN <paul.poulain@free.fr> wrote:
Another solution would be to have a "generic" style sheet, and a little specific with only the differing menu.
You would still end up with a different template for every type of page, wouldn't you? -- MJR/slef My Opinion Only and possibly not of any group I know. http://mjr.towers.org.uk/ jabber://slef@jabber.at Creative copyleft computing services via http://www.ttllp.co.uk/ Thought: "Changeset algebra is really difficult."
MJ Ray wrote:
paul POULAIN <paul.poulain@free.fr> wrote:
Another solution would be to have a "generic" style sheet, and a little specific with only the differing menu.
You would still end up with a different template for every type of page, wouldn't you?
I've commited my idea yesterday. Please look at includes/common-css and *top.inc I still have 1 template "body" for each type of page, but that's not a problem imho. -- Paul POULAIN Consultant indépendant en logiciels libres responsable francophone de koha (SIGB libre http://www.koha-fr.org)
Hi Paul, Can you tell me a little about the awards event please :-) Was it "glittering" were the canapes fresh, was it good/important etc etc I've got an interveiw with our city council business development people for their magazine, and would be good to say "Paul Poulain attended the event and said ...." Cheers R_____________________________________________________________ Rachel Hamilton-Williams Katipo Communications WEBMISTRESS ph 021 389 128 or +64 04 934 1285 mailto:rachel@katipo.co.nz PO Box 12487, Wellington http://www.katipo.co.nz New Zealand Koha Open Source Library System http://www.koha.org
On Wed, 28 May 2003, Rachel Hamilton-Williams wrote:
Hi Paul, Can you tell me a little about the awards event please :-)
Please tell us all .. we're waiting with baited breath. -pate
Was it "glittering" were the canapes fresh, was it good/important etc etc
I've got an interveiw with our city council business development people for their magazine, and would be good to say "Paul Poulain attended the event and said ...."
Cheers R_____________________________________________________________
Rachel Hamilton-Williams Katipo Communications WEBMISTRESS ph 021 389 128 or +64 04 934 1285 mailto:rachel@katipo.co.nz PO Box 12487, Wellington http://www.katipo.co.nz New Zealand Koha Open Source Library System http://www.koha.org
------------------------------------------------------- This SF.net email is sponsored by: ObjectStore. If flattening out C++ or Java code to make your application fit in a relational database is painful, don't do it! Check out ObjectStore. Now part of Progress Software. http://www.objectstore.net/sourceforge _______________________________________________ Koha-devel mailing list Koha-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/koha-devel
participants (4)
-
MJ Ray -
Pat Eyler -
paul POULAIN -
Rachel Hamilton-Williams