[geeklog-devel] Request: Template Class Enhancement

Dirk Haun dirk at haun-online.de
Sun Mar 16 13:55:18 EST 2003


Mark Limburg <mlimburg at iprimus.com.au> wrote:

>  Now from memory, we're using a cutdown and slightly rewritten version 
>of PHPLib's template class ... did the original handle logic control?

We're using an unchanged, unmodified version of PHPlib's template
library. The file has simply been renamed.

And no, the original does not support "if" or other logic control, see
<http://www.sanisoft.com/phplib/manual/template.php> for the original
documentation.

I've found that in most cases, I can handle if-cases in the PHP logic and
use one of the following solutions in the template files:

1) For links: {start_my_link}{link_text}{end_my_link} where
{start_my_link} is either empty or contains the actual link, e.g. <a
href="http://..."> (and likewise for the {end_my_link}

2) Nested templates, especially for lists.

Maybe that gives you some ideas ...

bye, Dirk


-- 
http://www.haun-online.de/
http://geeklog.info/




More information about the geeklog-devel mailing list