[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Koha-devel] template system abuse
From: |
Pierrick LE GALL |
Subject: |
Re: [Koha-devel] template system abuse |
Date: |
Thu, 13 Apr 2006 18:24:13 +0200 |
Robert,
On Thu, 13 Apr 2006 10:03:09 -0500
"Robert Flach, Poet and Critic" <address@hidden> wrote:
> It's a bad idea to generate ANY HTML in the code. Keep the
> presentation in the presentation layer (templates). No matter how
> obvious or useful a particular choice may seem now, it will cause you
> heartache down the road.
This remember a case were I didn't find any solution with template : N
levels nested lists.
<ul>
<li>1
<ul>
<li>1.1
<ul>
<li>1.1.1</li>
<li>1.1.2</li>
</ul>
</li>
<li>1.2
<ul>
<li>1.2.1</li>
<li>1.2.2</li>
</ul>
</li>
</ul>
</li>
<li>2</li>
</ul>
You don't know in advance the number of level. It can be 2 or 10. Is
that feasible in a template engine? (not with simple template engine in
my opinion). Personnaly, I resigned and coded it into PHP and gave an
HTML string to the template. I'm not sure this case happens in Koha,
but I think it's to easy to say "no HTML in script".
Robert, you're opinion? (a solution for my problem?)
--
Pierrick LE GALL
INEO media system