Using Objects
Fucntion | Code |
---|
Get current page | Kodeblok |
---|
#set ($pageManager=$action.getPageManager())
|
|
Get current Space key | Kodeblok |
---|
#set($spacekey=$renderContext.getOriginalContext().getSpaceKey()) |
|
Get page in Space by Pagetitle | Kodeblok |
---|
#set($pageid=$pageManager.getPage($spacekey,"$title").getId()) |
|
| |
String functions
Function | Code sample |
---|
String Contains (like Instr) | |
Replace | Kodeblok |
---|
#set($title=$parampath.replace("//", ""))
#set($title=$title.replace("%20", " "))
#set($title=$title.replace("/", " / ")) |
|
String functions
Function | Usage | |
---|
Contains | | |
| | |
|
| |
String to an Array | Kodeblok |
---|
#set($foo=$MyString.split(":"))
#foreach($line in $foo)
#end |
| |
O
...
Macro in Macro (Function/sub)
This is a recursive sample, where a Macro call itself:
...