Re: Conditional include

From: Date: Thu, 19 Jul 2001 14:45:38 +0000
Subject: Re: Conditional include
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-1210@lists.php.net to get a copy of this message
On Thu, 19 Jul 2001, Andreas Aderhold wrote: > Agreed to KISS and the design goals of smarty. But a conditional include > would not break these goald. "section" has the show attribute too and it > would be also a benefit for designers. Its just a _simplification_ of > > {if $ERROR_ARRAY} > {include file="errorbox.html"} > {/if} > > I think {include file="errorbox.html" show=$ERROR_ARRAY} makes the code more > readable and more comprehensive for the designers who never heard of if > clauses. I have to disagree. In the former case, there is a clear syntax that you can just read through, "if something, then include file such and such". The latter case is more confusing, "include file such and such.. and show something"? -Andrei "Try to spend the next 30 seconds not thinking about a blue-eyed polar bear." -Feodor Dostoevsky

« previous php.smarty.general (#1210) next »