AutoPatrol, Bureaucrats, Administrators
481
edits
Tomas Kirnak (talk | contribs) |
|||
Line 18: | Line 18: | ||
== Notes == | == Notes == | ||
If attribute name conforms to NXSL identifier naming conventions, it can be accessed directly as node object attribute. For example “GetCustomAttribute($node, "my_attribute")” can be changed to “$node->my_attribute” | If attribute name conforms to NXSL identifier naming conventions, it can be accessed directly as node object attribute. For example “GetCustomAttribute($node, "my_attribute")” can be changed to “$node->my_attribute”. If custom attribute does not exist, accessing via "->" will generate error. Alternative way it to use syntax "my_attribute@$node", which will return NULL for missing attribute instead. | ||
== Examples == | == Examples == |