[Koha-devel] prog templates (once again)...

Paul POULAIN paul.poulain at free.fr
Wed Jan 18 15:39:01 CET 2006


OK, I gave prog templates a last chance...
and worked on acquisitions to be sure every template is valid XHTML 
(there was some missing + lot of XHTML error)

And finally I agree to work with PROG...
I just have some comments to have consistent templates :
* validate the XHTML. to do this, the best is to : set insecure=yes in 
system preferences && have the webdev toolbar installed on firefox && 
ctrl-shift-H to validate the current page in the w3c validator.

* Some html proposals :
- use h1 for page main title
- use h2 for bloc level title
- write forms with : <p><label>text</label><input type="..."></p>, NOT 
with <table>
- use <table> as few as possible (and only where tables are useful)
- don't use <caption> at the beginning of tables, at least not for table 
title. As most blocs are not table, the caption does not exist 
everywhere. Use h2 instead

Questions :
* the toggle variable is what the template designers must use when 
wanting a toggle color in <table> : <!-- TMPL_IF name="toggle" --><td 
with_toggle1_parameter><!-- TMPL_IF --><td with_toggle0_parameter><!-- 
/TMPL_IF --> I suggest having a style "toggled" in the css to check that 
the HTML is correct.

* begin every "invariant" bloc with <!-- KOHA id="X" --> where X is a 
number : that is a big task and only useful is someone is ready to 
develop a "template compiler" (like the translator compiler). The idea 
would be to : be able to report blocs in a local template to have synch 
easier. An example :
==============
my local template
<p>something specific to me....</p>
<!-- KOHA id="1" -->
something coming from prog templates, unmodified
<!-- /KOHA -->
<!-- KOHA id="2" MODIFIED -->
Something modified locally, even if it exist in prog templates
<!-- /KOHA -->
<p> something still specific...</p>

the compiler would automatically replace the KOHA id=1 in the template, 
but let the KOHA id="2" as is, warning the user to check manually for a 
change.

Does it sound interesting ? It would only is template designers plan not 
to modify invariant blocs, even for some spelling reasons (like "book 
bag" in NPL template where default says "basket" !)

-- 
Paul POULAIN et Henri Damien LAURENT
Consultants indépendants
en logiciels libres et bibliothéconomie (http://www.koha-fr.org)





More information about the Koha-devel mailing list