RE: [phplib] Conditional Template blocks From: Layne Weathers (layne <email protected>)
Date: 05/09/01

> In the CVS-log for php-lib/CHANGES I see a comment from March
> 2000 about the Template class now supporting conditonal
> blocks. The next log entry, posted an hour later, undoes the
> change. Why was this feature not adopted?

The reason templates exist is to remove HTML from the programming/
decision-making process. This "feature" bastardized the class and
was removed.

> I could use it to
> distinguish the current page in a topmenu... Is there
> another standard way of emulating this feature? I know I
> could just move the surrounding <A> - </A> pair out of the
> template and into the code, but that's exactly what I would
> prefer not to - printing html from within my template parser.

Create two blocks in your template and only parse one of them.

This issue has been raised several times on the list and each time
the consensus has been to keep a pure templates class. Nobody cares
if you add such "features" to your own PHPLIB installation(s), just
don't add them to CVS after the maintainers have ruled against them.

Layne Weathers
Ifworld, Inc.

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>