[TriLUG] Smarty

Brian McCullough bdmc at buadh-brath.com
Thu Sep 19 16:56:59 EDT 2013


On Thu, Sep 19, 2013 at 02:52:34PM -0400, Brian Henning wrote:
> Maybe I'm being dense, but if you only care about the first record, why do a
> foreach at all?  Is that the only way that Smarty lets you get at the
> records in the result set?

Not being particularly familiar with Smarty, I was using what I found in the existing code, which is primarily IF and FOREACH.

I will look more closely at it, but my impression is that it expects the
Controller part of the MVC stack to be doing most of the heavy lifting,
which means that either there is a single value being displayed, or
some kind of collection ( array ) of data that is being shown in a table
or other display form.


Brian



More information about the TriLUG mailing list