The base class of CMS objects.
A CMS object is a collection of attributes and their values, as defined by its object class. For custom attributes, various attribute types are available.
The base class of CMS objects.
A CMS object is a collection of attributes and their values, as defined by its object class. For custom attributes, various attribute types are available.
Obj provides the following system attributes to all CMS objects:
| Attribute name | Getter | Purpose | Read only | |
|---|---|---|---|---|
_id | id() | Unique identifier of a CMS object. Can be specified only on object creation. Use id when searching. | • | |
_contentId | contentId() | [New in 1.22.0]In a multi-site environment, the key that connects individual pages on two or more sites as language versions of each other. Used by the versionOnSite and versionsOnAllSites instance methods. | ||
_createdAt | createdAt() | Date of the object’s creation. | • | |
_firstPublishedAt | firstPublishedAt() | Date on which the object was first published. | • | |
_language | language() | [New in 1.22.0]Language of the CMS object. The language code must be in accordance with ISO 639-1, e.g. “fr” or “en-US”. | ||
_lastChanged | lastChanged() | Date of most recent change made to the object. | • | |
_objClass | objClass() | CMS object model class, e.g. “NewsPage”. | ||
_path | path() | Path in the object hierarchy, e.g. “/about/staff” (optional). | ||
_permalink | permalink() | Unique permanent URL component of the object, e.g. “news” (optional). | ||
_publishedAt | publishedAt() | Date of the most recent publish of the object. | • | |
_siteId | siteId() | ID of the website the object belongs to. “default” if the Scrivito CMS doesn’t have multi-site enabled. |
ancestors()attributeDefinitions()backlinks()children()contentLength()contentType()contentUrl()copy()createdAt()delete()finishSaving()firstPublishedAt()get(attributeName)id()isBinary()isRestricted()language()lastChanged()metadata()modification()objClass()orderedChildren()parent()path()permalink()publishedAt()restrict()siteId()slug()unrestrict()update(attributes)updateReferences(mapping)versionOnSite(siteId)versionsOnAllSites()widget(id)widgets()