templating Branchtransfers.pl and other circulation pages.
Hi, I've got a problem templating circulation pages.... Traditionally, pages have One menu.... But there, startmenu returns a list.... that may have more than one element. print startpage(); my @inp=startmenu('circulation'); if ($query->param('barcode') eq '' && $query->param('charges') eq 'yes'){ my $count=@inp; for (my $i=0;$i<$count;$i++){ $inp[$i]=~ s/onLoad=focusinput\(\)/onLoad=focusinput\(\)\;messenger\(\"\/cgi-bin\/koha\/pay.pl?bornum=$bornum\",700,600\)\;window1.focus\(\)/; } } print @inp; What does that mean for web pages ? I donot have the old version to see what it means. If anyone could help, that might be cool :-) Another question... In circulation.pl, some big parts of the page are conditioned to subroutines results... I am wondering if it would be a good idea to have them included so that it would be nicer for HTML maintenance. Hence, if not advised not to do so, I am to do it in ONE file in order to make unity in developpement. Have a nice day. Henri-Damien LAURENT
Henri-Damien LAURENT a écrit:
Hi, I've got a problem templating circulation pages.... Traditionally, pages have One menu.... But there, startmenu returns a list.... that may have more than one element.
print startpage();
my @inp=startmenu('circulation'); print @inp;
What does that mean for web pages ? I donot have the old version to see what it means. If anyone could help, that might be cool :-)
you're wrong here dear friend : it's a @ because it's the content of circulation-top.inc file. replace all this by <TMPL_INCLUDE=...> and it will work nicely : there is still only 1 menu, which is done with @ lines of html !
Another question... In circulation.pl, some big parts of the page are conditioned to subroutines results... I am wondering if it would be a good idea to have them included so that it would be nicer for HTML maintenance. Hence, if not advised not to do so, I am to do it in ONE file in order to make unity in developpement.
Not sure to understand what you mean. splitting the template with <TMPL_INCLUDE > ? Maybe a sample if i'm wrong here ? I think, if i understand correctly your question, that a single template with <TMPL_IF> will do the job, as most parts are not used anywhere else => won't be useful to re-use any code. -- Paul POULAIN Consultant indépendant en logiciels libres responsable francophone de koha (SIGB libre http://www.koha-fr.org)
participants (2)
-
Henri-Damien LAURENT -
paul POULAIN