Learn how Scrivito CMS can help you deliver amazing digital experiences
See Scrivito CMS in action


Retrieves a custom attribute of a Widget instance.

Passing an invalid attribute name returns null.


  • attributeName (String) – The name of the attribute.


The value of the attribute. Its type can be Date, Number, Binary, Link, Obj,Widget, String, Array<Link>, Array<Obj>, Array<Widget>, or Array<String>. Its type can also be null in case the value is empty, or if the attribute does not exist.


Retrieve the value of a widget’s attribute, depending on the widget type:

widget = Scrivito.Obj.getByPermalink("blog").get("body")[0]; widget.objClass(); // => "ButtonWidget" widget.get("alignment"); // => "center"