Hierarchy Functions#
fn.hierarchy: Return the UUID of the current node.
fn.hierarchy_parent: Return the UUID of the parent.
fn.hierarchy_path: Return the current node hierarchy as a list of UUIDs.
fn.hierarchy_parent_path: Return the current node parent hierarchy as a list of UUIDs.
fn.hierarchy_friendly_path: Return the current node hierarchy as a dot-separated hierarchy string.
fn.hierarchy_friendly_parent_path: Return the current node parent hierarchy as a dot-separated hierarchy string.
fn.friendly_path_choices: Return a sorted list of friendly hierarchy paths. Used with a parameter:
down
: all hierarchies paths below, including current hierarchy pathbelow
: all hierarchies below current hierarchy path, excluding current hierarchy pathlocal
: current hierarchy path
fn.is_site: Return true or false if run at site context hierarchy or not.
Examples:
Example |
Output |
---|---|
{{fn.hierarchy}}
|
'52162d552afa433946245bcb'
|
{{fn.hierarchy_parent}}
|
'52162d522afa433941245ba0'
|
{{fn.hierarchy_path}}
|
['1c0efeg2c0deab10da595101',
'52162d4c2afa433940245ba3',
'52162d4e2afa43393b245ba2',
'52162d522afa433941245ba0',
'52162d552afa433946245bcb']
|
{{fn.hierarchy_parent_path}}
|
['1c0efeg2c0deab10da595101',
'52162d4c2afa433940245ba3',
'52162d4e2afa43393b245ba2',
'52162d522afa433941245ba0']
|
{{fn.hierarchy_friendly_path}}
|
'sys.GenCorp.SuperCom.ABCGroup.
Branch1'
|
{{fn.hierarchy_friendly_parent_path}}
|
'sys.GenCorp.SuperCom.ABCGroup'
|
Hierarchy =
{# fn.friendly_path_choices ,down #}
|
[
"sys.hcs.CS-P.CS-NB.AAAGlobal",
"sys.hcs.CS-P.CS-NB.AAAGlobal.LOC001",
"sys.hcs.CS-P.CS-NB.AAAGlobal.LOC002",
"sys.hcs.CS-P.CS-NB.AAAGlobal.LOC003",
"sys.hcs.CS-P.CS-NB.AAAGlobal.LOC004",
"sys.hcs.CS-P.CS-NB.AAAGlobal.LOC005",
"sys.hcs.CS-P.CS-NB.AAAGlobal.LOCALIZE001"
]
|
Hierarchy =
{{ fn.is_site }}
|
false
|