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.
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
Output
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,nonebodyType values allowed).Registered as staticContentMacros module in Confluence.
Preview
Input
Output