velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Tips for Readable Templates
Date Fri, 02 Aug 2002 18:07:07 GMT
Does anyone have any tips for keeping Velocity templates readable?
I keep running into cases where I have write a macro that doesn't 
introduce any extra whitespace, which means (I think) that all
of my #diretives need to be at the left margin of the file, without
any indentation to show nesting of statements.  This makes the macros
very difficult to read, especially when the #directives are intermixed
with HTML which must also be at the left margin.

Is there any work-around for this problem?

I did discover that the statement:
#   #set($a='hi')
will set $a to hi and not print the first #, but I think that is a
bug.  (#if and #end don't work that way.)

Thanks in advance for suggestions,

Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience
of buying online with Shop@Netscape!

Get your own FREE, personal Netscape Mail account today at

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message