Re: [PHP Template] Template Discussion

[email protected] (Monte Ohrt) Wed, 22 Mar 2000 14:03:31 -0600
Newsgroups php.template
Organization ispi
Message-ID <[email protected]>
Peter Kocks wrote:
> 
> >
> > 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.


This breaks the very reason for having templates. You are no longer
separating form from content. The programmer should have no care for
what the HTML output looks like, the designer must be able to control
this themselves. As soon as you said "coordinate with the programmer",
that threw a red flag. Too time consuming and to resource consuming to
do this on every little change.

> 
> > 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 designer needs control of the template layout, no more no less. This
is can all be covered with the proposed template logic. As Anne said, a
programmer can't possibly anticipate all the little formatting changes
and needs of the designer, thus this basic set of logic (includes,
conditional "ifs" and section loops) in the template is needed.

As Andrei pointed out earlier, we are writing a "real world" example of
the use of these templates. Hopefully this will shed some light on the
situation, and we'll get some more ideas from everyone how this should
be properly handled. We'll post it here when it is finished, probably
within the next day.

We want this template solution to be the right solution, whatever we all
can come to an agreement on. We've halted development on the template
engine (although it's almost complete) until we have a definitive goal.
We will heed to Rasmus' word, we don't want to be knocking skulls with
the other developers :-)


Monte