Hi,
I am trying to write a user macro that receives an integer as a parameter, and use it as an integer in a Velocity Range (for example) - I wrote a small macro -
## This is an example macro
## @noparam
#set ($maxndx = 20)
#set( $mindx = 12)
#foreach ($ndx in [$mindx..$maxndx])
$ndx
#end
That works fine - printing out the numbers from 12 to 20
But when I add a parameter (whose type is integer) and use its value (as the upper limit):
## @Param uplimit:title=Item Limit|type=int|desc=maximum number|default=25
#set ($maxndx = $paramuplimit)
The foreach statement doesn't seem to execute - there is no output.
I get similar phenomena when I try to use if-statments comparing an integer to a parameter value.
So how do I use integers as parameters to a User Macro?
Thanx