Chris W. Parker 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}
I should have put < html for bio or image or hyperlink > The way I put it there it looks like Smarty template code. >> {/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 could, but bio/image/hyperlink has HTML that I want to leave for my Front Page developer to be able to tweak. I want her to make it pretty and I just want to make it work. When the PHP code also had HTML her Front Page was constantly screwing with the code. And now she can mock up a new website in whatever she wants (Word exported to HTML for all I care) and I can hook in PHP code very easily. Together we can knock out nice-looking sites in far less time. /dev/idal -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php