Params
id
(String) – Theid
of theObj
.
Returns
- Returns the specified
Obj
, ornull
if the CMS object with the specifiedid
does not exist or is not assigned to the site of the context.
Retrieves the Obj
specified by its id
, if it is part of the site context.
frenchSite = Scrivito.Obj.onSite('fr');
pageId = Scrivito.load(() => frenchSite.root().children()[0].id());
page = frenchSite.get(pageId);
console.log(page.get("title"));
Params
id
(String) – The id
of the Obj
.Returns
Obj
, or null
if the CMS object with the specified id
does not exist or is not assigned to the site of the context.objId = "1fc90bb3c80a59dd";
obj = Scrivito.Obj.onAllSites().get(objId);
console.log(obj.get("headline"));