koha-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Koha-devel] question about templating and directory structure => Fi


From: paul POULAIN
Subject: Re: [Koha-devel] question about templating and directory structure => Finlay
Date: Tue Oct 1 12:23:25 2002
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826

Dorian Meid wrote:

    
Yes ;-)

Finlay has made a website describing the whole templating-stuff:
http://koha.org/contribute/templating/
The details are at:
http://koha.org/contribute/templating/contribute.html
OK

BUT :
* in templated scripts, we have :
my $theme=picktemplate($includes, $templatebase);
my $template = HTML::Template->new(filename => "$includes/templates/$theme/$templatebase", die_on_bad_params => 0, path => [$includes]);
* in C4::Ouput.pm/picktemplate, we have :
opendir (D, "$includes/templates");

So, template choosing depends only on theme, and not on language.
So, I conclude that finlays speaks, and we do something else. Not the best way to reach the goal ;-\
If we want to change something to this, we MUST DO IT NOW. Otherwise, it will become painfull very soon...

I propose :
we should change the picktemplate function. It could return the complete path to the template :
my $template_name=picktemplate($includes,$templatebase);
my $template = HTML::Template->new(filename => $template_name, die_on_bad_params => 0, path => [$includes]);
question : about language, can we "detect" it inside the picktemplate sub ?

PS : find . -name *.tmpl  from koha.v1.2 says :
./koha-html/intranet-html/includes/templates/cmsd/catalogue/searchresults.tmpl
./koha-html/intranet-html/includes/templates/cmsd/catalogue/intranet-main.tmpl
./koha-html/intranet-html/includes/templates/cmsd/catalogue/opac-main.tmpl
<SNIP>
./koha-html/intranet-html/includes/templates/default/catalogue/opac-search.tmpl
./koha-html/intranet-html/includes/templates/default/marcimport/AcceptBiblioitem.tmpl
<SNIP>
./koha-html/intranet-html/includes/templates/default/marcimport/uploadmarc.tmpl
./koha-html/intranet-html/includes/templates/default/user/userpage.tmpl


and from koha.v1.3 :
./koha/koha-tmpl/intranet-tmpl/default/en/searchheader.tmpl
<SNIP>
./koha/koha-tmpl/intranet-tmpl/default/en/overdue.tmpl
./koha/koha-tmpl/opac-tmpl/default/en/opac-detail.tmpl
<SNIP>
./koha/koha-tmpl/opac-tmpl/default/en/opac-user.tmpl
./koha-html/intranet-html/includes/templates/cmsd/catalogue/searchresults.tmpl
<SNIP>
./koha-html/intranet-html/includes/templates/cmsd/catalogue/opac-main.tmpl
./koha-html/intranet-html/includes/templates/default/catalogue/MARCdetail.tmpl
<SNIP>
./koha-html/intranet-html/includes/templates/default/parameters/marc_subfields_structure.tmpl
./koha-html/intranet-html/includes/templates/french/catalogue/detail.tmpl
<SNIP>
./koha-html/intranet-html/includes/templates/french/catalogue/subject.tmpl

Thus we don't respect finlay decisions neither in 1.2 nor   in 1.3...
We can drop french templates, i added them only for tests purposes. what about cmsd (steve ?

--
Paul


reply via email to

[Prev in Thread] Current Thread [Next in Thread]