private static void GetProvisionTextMessages(SharePointPnP.ProvisioningApp.DomainModel.Package package, ProvisioningActionModel model) { var settings = Newtonsoft.Json.JsonConvert.DeserializeObject <SharePointPnP.ProvisioningApp.DomainModel.TemplateSettingsMetadata>(package.PropertiesMetadata); if (settings?.displayInfo?.provisionMessages != null) { model.ProvisionPageTitle = settings.displayInfo.provisionMessages.provisionPageTitle; model.ProvisionPageSubTitle = settings.displayInfo.provisionMessages.provisionPageSubTitle; model.ProvisionPageText = settings.displayInfo.provisionMessages.provisionPageText; } }
private static String GetTemplatePreviewImage(SharePointPnP.ProvisioningApp.DomainModel.Package package) { var settings = Newtonsoft.Json.JsonConvert.DeserializeObject <SharePointPnP.ProvisioningApp.DomainModel.TemplateSettingsMetadata>(package.PropertiesMetadata); if (settings?.displayInfo?.previewImages != null && settings?.displayInfo?.previewImages.Length > 0) { var cardPreview = settings.displayInfo.previewImages.FirstOrDefault(p => p.type == "cardpreview"); if (cardPreview != null) { return(cardPreview.url); } } return(package.ImagePreviewUrl); }