Had some trouble getting the newly created fields using the "this.cmsservice.getcurrentpage()".
I've tried extending the PageNormalizer, but unsuccessful.
Any idea or workaround.
Had some trouble getting the newly created fields using the "this.cmsservice.getcurrentpage()".
I've tried extending the PageNormalizer, but unsuccessful.
Any idea or workaround.
Resolved this by extending/overriding the 'CMS_PAGE_NORMALIZER'. Added the new field under the properties of the original structure.
See below code:
export class pageNormalizer implements Converter<Occ.CMSPage, CmsStructureModel> {
convert(source: any, target?: CmsStructureModel): CmsStructureModel {
target.page.properties = {
newfield: source.newfield,
};
return target;
}
}