velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jon Stevens <...@latchkey.com>
Subject Re: More control in foreach
Date Mon, 12 Feb 2001 19:24:37 GMT
on 2/12/01 11:17 AM, "mike@bodaro.com" <mike@bodaro.com> wrote:

> One of the things I want to do is pageination – every site I've built
> needs this. One way to implement is to cache a big array server side and
> just display relavent parts from it. It would be nice if the #foreach
> macro was more like a regular for, where you can define the start and end
> index.

You can by properly defining the array that you are looping over.

> And really nice would be a #Break to get out of the #foreach.

why? you either want to display the data or you don't. a #if can achieve
that.

> I suspect that we can create our own macros? To do such things?

Yes.

-jon

-- 
If you come from a Perl or PHP background, JSP is a way to take
your pain to new levels. --Anonymous
<http://jakarta.apache.org/velocity/> && <http://java.apache.org/turbine/>


Mime
View raw message