Combination View Flat View Tree View
Threads [ Previous | Next ]
Mason Stein
Must velocity be "activated" in a new theme ?
December 5, 2012 5:55 AM
Answer

Mason Stein

Rank: Junior Member

Posts: 44

Join Date: December 5, 2012

Recent Posts

Hey all,

I am creating an own theme for liferay-portal-tomcat-6.1.1-ce-ga2.
But when I write something like "$foreach.count " the html page shows only "$foreach.count .

Do I have to activate something to get this working?
I mean, velocity is running correct because the navigation (#foreach ...) is working...

Many THX!
Anonymous
RE: Must velocity be "activated" in a new theme ?
December 5, 2012 3:07 PM
Answer

Anonymous

Use $velocityCount inside of the #foreach to get the index of the current loop
Mason Stein
RE: Must velocity be "activated" in a new theme ?
December 12, 2012 6:35 AM
Answer

Mason Stein

Rank: Junior Member

Posts: 44

Join Date: December 5, 2012

Recent Posts

THX a lot!
I will try this...

But still...where can I find out about what to use and what not?
Anonymous
RE: Must velocity be "activated" in a new theme ?
December 12, 2012 7:53 AM
Answer

Anonymous

velocity documentation and liferay API Java docs
Anonymous
RE: Must velocity be "activated" in a new theme ?
December 12, 2012 9:15 AM
Answer

Anonymous

- another variable that is helpful within a foreach loop is $velocityHasNext

if that is false then it means you are on the last item