> That's a clever idea for a shortcut.
Agree it's interesting, but I'm unsure it will be easy to agree on what
constitutes "true/false" to trigger the #else. Plus, well, the paradigm is a
bit wacky. I mean, even perl doesn't have an 'else' clause for a loop
construct. <grin>
The rule for true/false smells like business logic... which I personally
don't like putting in my templates, so I cringe at the idea of the Template
Engine embedding it. :-(
The backend can worry about the goofiness of java .length/size/size() and
just set a simple:
context.put("SHOW_RESULTS", new Boolean(myResultList.hasStuffInIt() &&
user.isAuthorized() );
#if ($SHOW_RESULTS)
#foreach ($result in $list_of_results)
$result
#end
#else
No results to show!
#end
And of course, that could be wrapped in a macro or two.
Timo
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]