Re: Template Proposal
| From: | Andrei Zmievski | Date: | Thu, 08 Nov 2001 22:23:48 +0000 |
| Subject: | Re: Template Proposal | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-2703@lists.php.net to get a copy of this message | ||
On Thu, 08 Nov 2001, Peter Bowyer wrote:
> Well, here's the section I was thinking of:
>
> {* This generates the code for the thumbnail table *}
> <table border=0 align="center" width="500">
> <tr>
> {section name=numloop loop=$data}
> <td valign="top" align="center">{$data[numloop]}</td>
> {* see if we should go to the next row *}
> {if (%numloop.rownum% mod $num_columns) == 0}
Better write it as:
{if (%numloop.rownum% is div by $num_columns) == 0}
It's a bit more "understandable" that way.
> </tr>
> {* don't start a new row on the last loop *}
> {if not %numloop.last%}<tr>{/if}
> {/if}
> {/section}
> </table>
>
> It doesn't take much mucking around to ruin it :-)
So, what do you think they would muck around with?
> And then what if they suddenly want alternating rows different colours? I
> hope you see what I mean... the PEAR table class would probably have been
> better, except then I have to change the code if they want to change the
> design.
You still have to educate them a bit on 'if' expressions and its
parameter.
> Part of the problem is that I'm designing for lower-than-designers - I want
> my script to be usable by anyone with basic knowledge of HTML, and things
> like the {section} block above IMNHO give them too much chance to muck it
> up. And yet I want to abstract _all_ design from code :-)
That's kind of impossible, methinks.
-Andrei
* "UNIX, isn't that some archaic form of DOS?" - our job applicant *