Hi Hughes

On Thursday, June 26, 2003, at 02:01 PM, M. C. Hughes wrote:


On Thu, 26 Jun 2003, Keith Seim wrote:


Anyone know if it's possible to do while loops in velocity templates?

The #foreach directive is the only looping construct provided by velocity.
Can you describe what you are trying to do in more depth? There might be a
way of making it work for you without it being a (dirty) hack.



~> Most certainly. I have a table "X" that has a foreign link column "ParentX" (foreign-key-> XID). While $myXinstance.xrelatedbyParentX()!=null, I want to print out X.description. Currently I've hacked it into my screen (do the while loop in the screen, and store a List in the context), but I'll likely run into a similar situations frequently (this was the first time I used a VM loop, and it came up right away).


Thanks for your time.
Keith


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to