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

getByPath(path)

Fetches the Obj with the given path from the site context.

frenchSite = Scrivito.Obj.onSite('fr'); frenchHomepage = frenchSite.getByPath("/"); console.log(frenchHomepage.get("title"));

Params

  • path (String) - The path of the Obj.

Returns

Obj | null - Obj if a CMS object with the given path exists and is assigned to the site, otherwise null.

See also

Obj.getByPath