You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@roller.apache.org by Evgeniy Strokin <ev...@yahoo.com> on 2007/08/01 19:31:27 UTC
_day.vm template question
Hello,
Some times I need to know how many times _day.vm template was called already.
Is any way to get this number?
For example, I have a blog which has 5 days on the first page displayed. In each day I have 2 posts.
Let's say I need to display posts of the latest day (on the top) in diferent color, and all others in other color.
How can I do this?
Thank you,
Gene
Re: _day.vm template question
Posted by Richard Jones <fu...@gmail.com>.
Hi Gene,
Not 100% sure if this will work, but when the _day template is parsed
you may be able to get the loop index using the built-in velocity
"$velocityCount" variable, see:
http://velocity.apache.org/engine/devel/user-guide.html#loops
HTH,
Richard
On 01/08/07, Evgeniy Strokin <ev...@yahoo.com> wrote:
> Hello,
> Some times I need to know how many times _day.vm template was called already.
> Is any way to get this number?
> For example, I have a blog which has 5 days on the first page displayed. In each day I have 2 posts.
> Let's say I need to display posts of the latest day (on the top) in diferent color, and all others in other color.
> How can I do this?
>
> Thank you,
> Gene