Iframe module

Important

Dynamics 365 Retail is now Dynamics 365 Commerce - offering comprehensive omnichannel commerce across e-Commerce, in-store, and call center. For more information about these changes, see Microsoft Dynamics 365 Commerce.

Important

Functionality noted in this topic is available as part of a preview release. The content and the functionality are subject to change. For more information about preview releases, see One version service updates FAQ.

This topic covers the iframe module and describes how to add it to site pages in Microsoft Dynamics 365 Commerce.

Overview

An iframe module provides an iframe (inline frame) that hosts external content on a site. For example, it can be used to host a YouTube video or a PDF file viewer on any site page.

An iframe module requires a target URL. It then hosts the content of the target page inside an HTML iframe element. External URLs must be on the allow list (also known as a "whitelist") per the site's content security policy (CSP) directives. For iframe content, URLs should be allowed by using the frame-ancestor directive. For more information, see Manage Content Security Policy (CSP).

The following image shows examples of iframe modules that showcase external videos on site pages.

Example of iframe modules that showcase external videos

Iframe module properties

Property name Value Description
Heading Text The heading for the module.
Target URL URL The URL that is hosted in the module.
Height Number or percentage The height of the module, in pixels or as a percentage. For example, the value 100 will be treated as a number of pixels, and the value 100% will be treated as a percentage.
Aria label Text An Accessible Rich Internet Applications (ARIA) label can be defined for accessibility purposes.

Add an iframe module to a page

To add an iframe module to a page to show an external video, follow these steps.

  1. Go to Templates, and select New to create a new template.
  2. In the New Template dialog box, under Template name, enter Marketing template, and then select OK.
  3. Select Save, select Finish editing to check in the template, and then select Publish to publish it.
  4. Go to Pages, and select New to create a new page.
  5. In the Choose a template dialog box, select the Marketing template template. Under Page name, enter Marketing page, and then select OK.
  6. In the Main slot of the new page, select the ellipsis (...), and then select Add Module.
  7. In the Add Module dialog box, select the Container module, and then select OK.
  8. In the module's properties pane, set the Width value to Fill Container.
  9. In the Container slot, select the ellipsis (...), and then select Add Module.
  10. In the Add Module dialog box, select the iframe module, and then select OK.
  11. In the module's properties pane, set the Target URL value to an external URL for a video.
  12. Set other properties, such as Heading and Height, as you require.
  13. Select Save, select Finish editing to check in the page, and then select Publish to publish it.
  14. Go to the marketing page on your site. You should see that the video is rendered in the iframe module.

Additional resources

Starter kit overview

Manage Content Security Policy (CSP)