I'm new to Velocity, but I have some experience in programming. I am,
however, having a hard time finding any references to syntax, available
commands, etc..... I'd like to do a few things like search, search &
replace, search and destroy....and I'm sure there will be others down the
road... I tried the Velocity site at Apache but there wasn't much there but
dead links. And when I search the web or news groups I get mostly articles
about the speed of light or cars.... I was surprised to hear that
"contains" was actually a command that would work. So....is "replace"
another command that will work?
Is there a good source for this info somewhere so I don't have to keep asking?
At 08:58 AM 2/3/2007, you wrote:
On Sat, 03 Feb 2007 10:37:54 -0500, Claude Brisson <[EMAIL PROTECTED]>
wrote:
Try with:
#if($foo.indexOf("moo foo") >= 0)
or
#if($foo.contains("moo foo"))
Claude
Le samedi 03 février 2007 à 08:30 -0700, tech1 a écrit :
I'd like to use a conditional statement that tests content for keywords.
I've only been able to find gt, lt or == as conditionals in any of the
user
guides......
For example:
#set( $bar = ["foo", "moo foo", "bar moo foo", "bar foo moo", "foo
moo
foo"] )
#foreach ( $foo in $bar )
#if ( $foo contains "moo foo")
#do some stuff
#end
#end
Which will do stuff with "moo foo" "bar moo foo" and "foo moo foo" ;
and ignore "foo" and "bar foo moo".
Is there any way to search contents using an if statement in Velocity?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]