Stand with Ukraine 🇺🇦
Products
Services
Blog
About Us

Macro Type: Static vs Dynamic

Atlassian Cloud provides two types of Connect macros to extend and enhance Confluence functionality: Static macros and Dynamic macros. These macros serve distinct purposes and are chosen based on the level of interactivity and complexity required for the use case.

Editable at creation only
In the User Macro app, the content type can only be selected during the macro creation step.
It can't be edited later to prevent unexpected behavior from Confluence once rendered.

Dynamic macro

  • Rendered asynchronously within custom iframe.

    • Asynchronious render ensures faster initial page loads.

    • Atlassian-managed sandboxed iframe enhances security and prevents conflicts with the parent page.

  • Macro template allow complex HTML extended by Apache Velocity template engine. AUI library components and custom styles (inline CSS and <style> tags) can be applied.

  • Registered as dynamicContentMacros module in Confluence.

Preview

  • Input

    image.png

  • Output

    image-20260508-130629.png

Static macros

  • Loads within the page: rendered synchronously from valid Storage Format as seamless page HTML without using iframes.

  • Supports only Confluence Storage Format ('XHTML-based' due to large HTML proportion). Any other formats would be cleaned.

  • Supports inline CSS.

  • Can render nested macros (in storage format)

  • Can have $body (rich-text, none bodyType values allowed).

  • Registered as staticContentMacros module in Confluence.

Note:
Static macros use caching to enhance performance.
It's achieved thanks to storing rendered output in Confluence’s page storage.

Preview

  • Input

image2.png

  • Output

image-20260508-131227.png