Random Number Generator?

Joel Trauger's Avatar

Joel Trauger

14 Aug, 2014 08:02 PM

I know that traditional Apache Velocity has a Mathtool and is accessed via $math. function() .

Is there a way to do this in Cascade such that #set ( $number = $math.add(1, 1) ) followed by ${number} will give a result of 2?

This would greatly help with presenting a fresh and dynamic webpage to the viewer each time they look at it if we could choose random blocks that have been filled out with a data definition.

  1. 1 Posted by Ryan Griffith on 14 Aug, 2014 08:19 PM

    Ryan Griffith's Avatar

    Hi Joel,

    There is a Math Tool available for Velocity Formats, which I believe is what you are looking for. For additional documentation, feel free to check out this page.

    Please let me know if you have any questions.


  2. 2 Posted by Joel Trauger on 14 Aug, 2014 08:29 PM

    Joel Trauger's Avatar

    This is exactly what I needed. Thanks. I was unaware that it was prefixed with `$_Mathtool`. This helps a lot.

    Joel Trauger
    Office of Marketing and Communications
    Henderson State University<http://www.hsu.edu>
    Box 7823 • Arkadelphia, AR 71999-0001

  3. 3 Posted by Ryan Griffith on 15 Aug, 2014 12:52 PM

    Ryan Griffith's Avatar

    Not a problem at all, Joel, I am glad to hear I was able to help out. I'm going to go ahead and close this discussion, please feel free to comment or reply to re-open if you have any additional questions.

    Have a great day!

  4. Ryan Griffith closed this discussion on 15 Aug, 2014 12:52 PM.

Discussions are closed to public comments.
If you need help with Cascade CMS please start a new discussion.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac


26 Aug, 2016 01:19 PM
25 Aug, 2016 03:02 PM
25 Aug, 2016 12:50 PM
24 Aug, 2016 08:43 PM
24 Aug, 2016 07:20 PM
21 Aug, 2016 01:20 PM