user-defined variables or metadata placeholders in PDF exporter?
Hi
Scroll Office has support for a user-defined placeholder called metadata. Is this supported in PDF exporter? Could I use it on the Title Page template?
I'd like to define a release number "variable" that we can change programmatically during a software build. The PDF exporter would replace the variable with its value when the PDF is generated.
The Office Placeholder info is here: http://www.k15t.com/display/OFCE/Placeholders+Reference
Here is an excerpt from that doc about metadata:
$scroll.metadata.(YOUR_METADATA_KEY) | This placeholder can be used to access metadata defined on the root page of your export. ![]() |
Complex Content | You have to provide the metadata value in your wiki page e.g. to resolve the meta data key uservar1 to the value My metadata value: 1. add $scroll.metadata.(uservar1) to your template 2. in your wiki page specify the value by entering {metadata:uservar1}My metadata value{metadata} |
-
Hi Brad,
this is indeed possible with the PDF Exporter. In your template use the following code to use the value of your variable:
$metadata.from("<variable>")
with <variable> being replaced with your variable's name (you must preserve the double quotes).
This one works with the metadata plugin. To read the values of arbitrary content properties you can use this similar command:
$contentProperty.from("<variable>")
Best regards,
Jens -
Hi Jens,
as I am trying to get some metadata from the adhoc workflows plugin (http://support.k15t.com/entries/20871367-access-to-adhoc-workflows-in-pdf-exporter) I stumbled uponthe Replacement Reference and your line $metadata.from("Author") .
I tried using it, but instead of metadata, it just output "$metadata.from("Author") ". Why is that?
Best regards,
Stefan
PS: Our installation does have the Metadata Plugin...
-
Hi all,
the metadata plugin has been migrated to Confluence 4 in the meantime, see here: https://marketplace.atlassian.com/plugins/org.andya.confluence.plugins.metadata
Best regards,
Jens
Please sign in to leave a comment.
Comments
5 comments