I am trying to get the metadata widget to work in CS 16.2.
Using code from the CS UI SDK example, I get the widget to display in a html page, but it shows a "No data to display" message.
Checking the browser console, I can see that an error occurs when loading the widget:
Has anything changed between versions that could cause the code in the sample to be outdated?
My code below:
var contentRegion = new Marionette.Region({el: '#meta'}),
pageContext = new PageContext(),
currentNode = pageContext.getModel(NodeModelFactory, {attributes: {id: 82405}});
metaDataView = new MetaDataView(
{
context: pageContext,
model: currentNode,
showCloseIcon: true,
showBackIcon: true,
showRequiredFieldsSwitch: true
});
contentRegion.show(metaDataView);
pageContext.fetch();