> ;-)  hah.  bet you never thought that would be used in favor of adding
> a feature!
Indeed. ;-)

> the #else statement is rendered anytime the #foreach doesn't render
> its innards for whatever reason.  i think we can all very easily agree
> on that!
Hmm... didn't you once argue that null isn't the same as "no results"? Or
was that me? ;-)


So if #foreach ($result in $thingy.foo.results) dies when foo is null, that
means semantically "no results". 

Smells like biz logic weirdness to me.


> i don't see how doing #else
> is any more business logic than your example.
Your example: template engine makes the decision on what means True/False.
My example: template engine just tests a Boolean for true/false. 

Less magic in mine than yours.


> and even if it is, i've always tended to side with elegance over
> pure-MVC-ism (thus my interest in Pull-MVC and VelocityTools).  ;-)

I always tend to side with keeping the templates dead simple. Adding a
#foreach/#else smells like syntactic sugar that can be accomplished in the
existing system with less uncertainty on the rules. 

Another way -- I don't like the idea of telling a Template author that "#if
#else" is triggered whenever "$results is empty... or maybe null... or well,
if anything in there just plain blows up... or some other mystery buried in
the Velocity Engine"

> still the real deciding factor will be whether anyone steps up to
> scratch this itch with a patch.  i wish i could say i would, but i
> know i won't ever get to it.
Ha -- well, since the dude who suggested it won't lower himself to login to
bugzilla... I doubt you'll see a patch entered by him. <grin>

But it seems other folks like the idea too... so maybe they'll scratch. 

Cheers,
Timo



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to