This Confluence Cloud macro creates a page-break element used for print and PDF export scenarios while preventing unnecessary space during macro preview rendering. It detects the current render output type using $renderContext.outputType and, when running in preview mode, hides the page-break container, removes margins and dimensions, collapses the iframe body to zero height, and calls AP.resize() to eliminate blank space and avoid significant layout gaps in the editor preview.
#set($outputType = $renderContext.outputType)
<div
id="vlt-page-break"
style="page-break-before: always;"
>
​
</div>
<script>
AJS.toInit(function() {
const outputType = "$!outputType";
const wrapper = document.getElementById("vlt-page-break");
if (outputType === "preview") {
wrapper.style.display = "none";
wrapper.style.height = "0px";
wrapper.style.minHeight = "0px";
wrapper.style.margin = "0";
wrapper.style.padding = "0";
wrapper.style.overflow = "hidden";
document.body.style.height = "0px";
document.body.style.minHeight = "0px";
AP.resize("0px", "0px");
setTimeout(() => AP.resize("0px", "0px"), 100);
return;
}
});
</script>Display page edit and view restrictions in Confluence to get essential permission details, including users, groups, and inherited access.
Shows page creation date
Show an expandable page tree for a selected parent page (defaults to the current page)
This macro allows user to retrieve all pages from current space despite limitation of 250 pages per request
Space Information macro by space Id
Retrieve and display all page content properties in an AUI sortable table
Macro for generating ID in base32 format
Read and display the fixed version of Confluence pages by checking page or ancestor labels
Find image within page attachments. Handy for reuse files and update them all at once
An overview of all pages within one space which contains the title, the version, and the last updated date