HOC SiteDocumentation

Iframe

Decoration and visibility use Decoration & visibility (BlockShell).

Generic iframe for live site previews or embeds. Use sitemap routes or relative paths for internal pages; absolute URLs for external sites. Size the frame via Customize. Click action can leave the iframe interactive, expand it to fill the tab (showcase style), or open the URL in a new tab.

Examples

Internal preview

{
  "action": {
    "url": "/teknoloji"
  },
  "embed": {
    "title": [
      {
        "if": "*",
        "is": "Technology"
      }
    ]
  }
}

Expandable showcase

{
  "action": {
    "url": "https://horecadepot.be"
  },
  "embed": {
    "title": [
      {
        "if": "*",
        "is": "Web sitesini görüntüle"
      }
    ],
    "clickAction": [
      {
        "if": "*",
        "is": "expand"
      }
    ]
  }
}

Fields

action

url

Iframe src. Supports sitemap route pick, relative path, or external URL.

action: {
  url: "/teknoloji" | { routePageId, url }
}

embed

title

Accessible iframe title. Also used as the preview overlay label when click action is Expand or Open new tab.

embed: {
  title: [{ if: "*", is: "Preview" }]
}

clickAction

none: interact inside the frame. expand: scaled preview that fills the tab on click (browser Back collapses). newTab: scaled preview that opens the URL in a new tab.

embed: {
  clickAction: [{ if: "*", is: "none" }] | [{ if: "*", is: "expand" }] | [{ if: "*", is: "newTab" }]
}

Default props

{
  "shell": {
    "visibility": [
      {
        "if": "*",
        "is": true
      }
    ],
    "anchor": {
      "anchorId": [
        {
          "if": "*",
          "is": ""
        }
      ],
      "anchorKey": [
        {
          "if": "*",
          "is": ""
        }
      ]
    },
    "pointerEvents": [
      {
        "if": "*",
        "is": "auto"
      }
    ]
  },
  "action": {
    "url": ""
  },
  "embed": {
    "title": [
      {
        "if": "*",
        "is": ""
      }
    ],
    "clickAction": [
      {
        "if": "*",
        "is": "none"
      }
    ]
  }
}