Difference between revisions of "NXSL:GetNodeTemplates"
Jump to navigation
Jump to search
Tomas Kirnak (talk | contribs) (Created page with "__NOTOC__ Get accessible template objects for given node. '''Since:''' 2.0-M1 == Syntax == GetNodeTemplates(''node''); == Parameters == :{| |- | ''node'' || NXSL:Node|...") |
(No difference)
|
Revision as of 11:19, 14 November 2014
Get accessible template objects for given node.
Since: 2.0-M1
Syntax
GetNodeTemplates(node);
Parameters
node Node object. Predefined variable $node can be used to refer to current node in transformation script or event processing policy rule.
Return Value
Array of objects, with first object placed at index 0. End of list indicated by array element with null value. Return value also affected by trusted nodes settings (see Security Issues for more information).
This function will only return template objects applied to node with the object type:
OBJECT_TEMPLATE
Examples
// Log names and ids of all accessible templates for current node
templates = GetNodeTemplates($node);
foreach(t : templates)
{
trace(1, "Template object: name='" . t->name . "' id=" . t->id);
}