Helma Logo
main list history

Version 4 by Philipp on 21. January 2010, 12:14

12* prepend(str) - like append.

Version 3 by Philipp on 21. January 2010, 12:14

11* append(str) - append the str to the incomming string.

Version 2 by Philipp on 21. January 2010, 12:12

1# == Macros
2
8# == Filters
9

Version 1 by Philipp on 21. January 2010, 12:10

1# Macros
2* now(offset)  - current Date + offset
3* renderSkin(skin) - renders the given skin, should be in HopObject & Global
4* random(from, to) - returns a random between 0 and 1 or param.from to param.to
5* queryParam(name) - returns the req.queryParam
6* postParam(name) - returns the req.postParam
3# Filters
4* boolean(true, false) - return the true or false parameter, depending on input
5* if(x, is, a, then, y, else, z) - http://code.google.com/p/antville/source/browse/trunk/code/Global/Global.js#237
6* switch(case1, case2, ...) - return the value of the case defined by the input
7* isNaN - returns true or false, maybe followed by a boolean-filter
8* isNull - returns true or false, maybe followed by a boolean-filter
9* isLowerThan(val) - returns true or false, maybe followed by a boolean-filter
10* isBiggerThan(val) - returns true or false, maybe followed by a boolean-filter
11* isEqual(val) - returns true or false, maybe followed by a boolean-filter
12* toggle(option1, option2) - toggles between option1 or option2
13* formatDuration - formats the incomming input from seconds to HH:mm:ss
14* formatFilesize(to) - formats the incomming filesize in byte KB, MB, GB, TB
15* formatNumber - calls Helma's Number.format()
16* formatParagraphs - call Helma's formatParagraphs()
17* macroTag - render the input in macro-tags, e.g. "mymacro" | macroTag should return "<% mymacro %>"
18* bindHandler - bind the input object to res.handlers[param.name]
19* dateOffset(days,months,years) - increases the incomming Date by the given params
20* link - call html.linkAsString()
21* href - call the href on the input object
22* toFixed(c) - calls Number.toFixed(c)