Chris de Vidal <mailto:[EMAIL PROTECTED]>
    on Tuesday, April 06, 2004 11:43 AM said:

> I could have put a tag in the template like {bio} but that'd mean
> maintaining HTML in the PHP code which I wanted to avoid (left the
> "prettyness" to the Front Page developer).  Instead, I put something
> like this in the template:
> {if $level > 2}
>  {bio}
> {/if}

i've never used smarty* but i think i understand how it works. so my
question is this...

would it not be better to place that logic in your php code instead of
your template?

my thinking is this: if {bio} contains anything, it will print to the
page. if it doesn't contain anything, nothing will be printed. so
there's no need to check the value of $level within the template since
{bio} will simply contain something, or it will not.

i'm purely looking to understand this "smarty" thing a little better. :)


chris.


* i did try it once or twice in the past, with little things but didn't
quite grasp it.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to