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


Creates a new Obj with the given attributes.

Scrivito.getClass("BlogPost").create({ title: "Hello world!" })


  • attributes (Object) – The custom attributes and their values of the new CMS object.


  • ArgumentError – If a given attribute is invalid.


The created Obj.


Create a new blog post with a permalink:

Scrivito.getClass("BlogPost").create({ _permalink: "scrivito-best-practices", title: "How to Make the Best of Scrivito", });

Be aware that setting a permalink this way (as opposed to setting it using the UI’s permalink editor) does not check whether the permalink is already in use.

Create a new page consisting of an initial text widget that says “Hello!”. After creating the page, navigate to the new page:

Page = Scrivito.getClass('Page'); TextWidget = Scrivito.getClass('TextWidget'); widget = new TextWidget({ text: 'Hello!' }); obj = Page.create({ body: [widget] }); Scrivito.navigateTo(obj);