RE: [PHP Template] Template Discussion

[email protected] ("Peter Kocks") Wed, 22 Mar 2000 11:49:25 -0800
Newsgroups php.template
Message-ID <[email protected]>
>
> Example 1:
> headline
> <br>
> tagline
> <br><br>
> body copy
>
> If the tagline is empty, the example above will
> print as shown below:
> Example:
>
> headline
> <br>
> <br><br>
> body copy
>

Ok, so why not coordinate with the programmer and do
something like this:

headline
<br>
$tagline
<br>
body copy.

and tell the programmer that $tagline should have a <br> at
the end if the value is not empty.

> etc. All are dependent upon logic that accounts
> for all possibilities.
>

Yes, and accounting for all the possibilities is turning you
into a programmer whether you want to be or not.  The short
answer is that if you are using "if" statements, you are in
effect programming.

The beauty of php is that it is both simple enough that
people not inclined to programming can still use it when
necessary, but powerful enough to be useful to programmers.
Imagine having to write a java servlet just to get your if
statement.

> In the eyes of the designer, the proposed
> template specs are no
> different than learning a few new html tags. They
> will add tremendous
> value to the presentation of php.
>

Yes, but the only difference is in syntax.  Instead of
having to learn new tags, why not just use the existing
syntax.

E.g.
<? if($x==$y) ?> <br><br>