You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@roller.apache.org by Evgeniy Strokin <ev...@yahoo.com> on 2007/01/28 03:08:15 UTC
random number in template
Hi, is any way to generate random number in given interval in template?
Thx
Re: random number in template
Posted by strokine <ev...@yahoo.com>.
Generic Toolbox has math tool which has random method.. So I want to use this
to generate random number on my template.
I created toolbox.xml and dropped it to WEB-INF folder plus
velocity-tools-generic-1.2.jar in to WEB-INF/lib
I don't know and couldn't find what should I put in velocity.properties?..
Could you help me out? because it still doesn't work on templates,.. $math
is not available.. I guess I still should do something..
Thx
Allen Gilliland-3 wrote:
>
> yes, we could do that, but I don't think there is a strong need.
>
> If you want to enable it you can certainly do that for your
> installation. Just configure it in the WEB-INF/velocity.properties file
> and you should be all set.
>
> -- Allen
>
>
> strokine wrote:
>> Actually Velocity has ToolBox which has math tools.. do you know how to
>> use
>> Velocity toolbox in Roller?
>>
>>
>> Allen Gilliland-3 wrote:
>>> No there isn't any way to do that right now, but I suppose that a method
>>> could be added to the UtilitiesModel for getting a random number.
>>>
>>> Something like, $utils.randomNumber()
>>>
>>> -- Allen
>>>
>>>
>>> Evgeniy Strokin wrote:
>>>> Hi, is any way to generate random number in given interval in template?
>>>>
>>>> Thx
>>>>
>>>
>>
>
>
--
View this message in context: http://www.nabble.com/random-number-in-template-tf3129871s12275.html#a8694262
Sent from the Roller - Dev mailing list archive at Nabble.com.
Re: random number in template
Posted by Allen Gilliland <al...@sun.com>.
yes, we could do that, but I don't think there is a strong need.
If you want to enable it you can certainly do that for your
installation. Just configure it in the WEB-INF/velocity.properties file
and you should be all set.
-- Allen
strokine wrote:
> Actually Velocity has ToolBox which has math tools.. do you know how to use
> Velocity toolbox in Roller?
>
>
> Allen Gilliland-3 wrote:
>> No there isn't any way to do that right now, but I suppose that a method
>> could be added to the UtilitiesModel for getting a random number.
>>
>> Something like, $utils.randomNumber()
>>
>> -- Allen
>>
>>
>> Evgeniy Strokin wrote:
>>> Hi, is any way to generate random number in given interval in template?
>>>
>>> Thx
>>>
>>
>
Re: random number in template
Posted by strokine <ev...@yahoo.com>.
Actually Velocity has ToolBox which has math tools.. do you know how to use
Velocity toolbox in Roller?
Allen Gilliland-3 wrote:
>
> No there isn't any way to do that right now, but I suppose that a method
> could be added to the UtilitiesModel for getting a random number.
>
> Something like, $utils.randomNumber()
>
> -- Allen
>
>
> Evgeniy Strokin wrote:
>> Hi, is any way to generate random number in given interval in template?
>>
>> Thx
>>
>
>
--
View this message in context: http://www.nabble.com/random-number-in-template-tf3129871s12275.html#a8692248
Sent from the Roller - Dev mailing list archive at Nabble.com.
Re: random number in template
Posted by Allen Gilliland <al...@sun.com>.
No there isn't any way to do that right now, but I suppose that a method
could be added to the UtilitiesModel for getting a random number.
Something like, $utils.randomNumber()
-- Allen
Evgeniy Strokin wrote:
> Hi, is any way to generate random number in given interval in template?
>
> Thx
>