Measurable Success «10 Checkpoints for Future-Proof Enterprise CMS» White Paper
Measurable Success - White Paper

getClass(name)

Returns the CMS object or widget class of the given name.

const TextWidgetClass = Scrivito.getClass("TextWidget");
const firstWidget = Scrivito.currentPage().widgets()[0];
console.log("The current page starts with text:", firstWidget instanceof TextWidgetClass);

Params

  • name (String) – The name of the CMS object or widget class.

Returns

ObjClassWidgetClass, or null.