In both use cases described above, the Campaign App opens a new window where the actual preview is embedded in an iframe. The URL of this iframe is configured in the usual way that preview URLs are configured for CoreMedia Studio, cf. "Customizing CoreMedia Studio > Multiple Previews Configuration" in the "Studio Developer Manual".
To support the use case where one single localized campaign is previewed, the embedded preview URL receives an additional hash parameter
localizedCampaignId. To support the use case where multiple campaigns are previewed for a specific date, the embedded preview URL receives additional hash parameters for the preview date. In this case, two hash parameters are added:
previewDateISO with the preview date in ISO format and
previewDate with the preview date in the proprietary or legacy format that CoreMedia Studio uses for the preview date.
As usual when configuring previews for CoreMedia Studio, you can also use these hash parameters as template values to appear differently in your preview URL. In the example below, the
genericStudioPreviewProvider is used to provide the localized campaign id as a different hash parameter (
campaign) in the URL.
Note: Be careful when using
previewDateISO / previewDate as values for path segments in URL templates. They are not always defined and will then be substituted with an empty string: in the single campaign preview case,
previewDateISO / previewDate is not defined and in the multi-campaign preview case,
localizedCampaignId is not defined.