Difference between revisions of "NXSL:SetCustomAttribute"
Jump to navigation
Jump to search
(Created page with "__NOTOC__ Get value of node's custom attribute. Function returns requested attribute's value on success or NULL if given attribute does not exist. == Syntax == SetCustomAttri...") |
(No difference)
|
Revision as of 12:47, 6 July 2012
Get value of node's custom attribute. Function returns requested attribute's value on success or NULL if given attribute does not exist.
Syntax
SetCustomAttribute(node, attributeName, value)
Parameters
node | Node object, you can use predefined variable $node to refer to current node. You can also use null as node if trusted nodes check is disabled (see Security Issues for more information). |
attributeName | Custom attribute name. |
value | New value for custom attribute. |
Return Value
Previous value of custom attribute or NULL if attribute was not defined before.
Examples
SetCustomAttribute($node, "my_attribute", "new value") -> "old value"
SetCustomAttribute($node, "non_existing_attribute", "new value") -> NULL