This page describes a way of allowing arbitrary Confluence content, including macros, in the bodies of macros that don't normally allow this.
Confluence macros can be nested within other macros. For instance, the
chart macro can take a static table as input:
But it can also take output from a SQL macro:
(or CSV, or any other table-generating macro)
This plugin composability allows very powerful combinations. Like Unix pipes, one macro fetches data and feeds it to another.
This is great, but only works when the macro in question was designed to accept the "rich text" XHTML generated by another macro. The
chart plugin can have a nested macro, but the
SQL Query plugin can't, for example.
Why would we want to send dynamic content to a macro not expecting it? Here are a few situations:
- You write a
parammacro that returns a HTTP parameter from the URL, and want to use it to parametrize a SQL query.
The solution is to create a wrapper macro that accepts rich text as input, converts it to plain text