This lesson will cover the following topics:

01 Getting Started

This tutorial covers how you can use an iframe and embed that into your project, including:
  • How to embed the URL in the iframe.
  • Post messages to the iframe.
Note: Not every site allows the content to be hosted in an iframe. Ensure you have checked that an iframe is supported before completing any of the following steps.

02 Embedding URL in an Iframe

1. Click the + icon to open the elements menu and click the media tab. 
plus icon that opens the element menu
2. Drag the iframe element onto your canvas.

3. Navigate to the iframe settings menu and paste your URL into the link field.
iframe settings link field
Your project will load your iframe. This means you can host another website within your Titan web project.

03 Posting Messages to your Iframe

A button was inserted under the iframe and a post message on click action was configured.
post message configuration
It is important that the content you are embedding in the iframe has the appropriate variables configured to ensure your message displays correctly. Any changes that you make to the content must be published again for the content to reflect in the iframe.

To enable post messaging:
1. Navigate to the project settings menu and select tools.
2. Enable the Post Message toggle switch and click the gear icon.
project settings > tools tab > post message toggle switch
3. Use the options in the Configure Post Message window to configure which domains are allowed and the target, and configure the parameters.
configure post message window

04 Got Feedback?