I am trying to add dynamic content to the Velocity Template of a Export Layout (for HTML Space Export in Confluence Data Center).
Adding services to the Velocity Context for ‘Main Layout’ or ‘Page Layout’ via the Velocity Context module seems to work for Site and Content Layouts, but not for Export Layouts.
In the Page Layout it is also possible to render a macro using its wiki representation (via $helper.renderConfluenceMacro("{macro-name:...}")
), but this also seems not to be available in the Export Layouts.
Which objects are commonly available in the Velocity Context for a Template of the Export Layouts is documented in Available Velocity Context Objects in Exporters or one could have a look at the code of the exporter com.atlassian.confluence.impl.importexport.HtmlExporter
. I do not see a service that would allow me to inject one of my services into the Export Layout Velocity Context.
Is there a way to make own services / Java objects available to Velocity Templates of Export Layouts?