Create a new page by confiForms using the storage format of "template page"

Ralf Weidauer July 25, 2024

I would like to create new pages using a storage format (because I want to dynamically set certain macro parameters which I cannot set using space templates).

Displaying the value of a ConfiForms field of type "Storage format" would look alright, but the page contains only the reference to the stored field and you are not able to edit the page as if it was a copy of the original one.

Applying the "storageToHtml" virtual function (and use the entry as macro body of "CreatePage") to the "Storage format" field would give an editable page but removes all macros contained in the original page.

So, is there a way to create a page (through ConfiForms) defined by a storage format?

1 answer

1 accepted

1 vote
Answer accepted
Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 4, 2024

You can reference space template by ConfiForms Create Page macro and in that template have references to fields (field values) via [entry.field_name] notations or even the Velocity templating that should allow you to parameterized whatever you want in a template

Ralf Weidauer August 5, 2024

Using Velocity variables should do it. Some macros are displayed like "Unknown macro 'myParameter'" (in the template editing view) but the result (using the template to ceate a page) is correct nevertheless.

Little bit strange, isn't it.

But thanks a lot, I guess "should allow you to parameterise whatever you want" convinced me.

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 5, 2024

This is an unfortunate old bug in Confluence editor - rendering a macro as unknown when one of the parameter values contains {}

(can be safely ignored, as this is just an editor's UI glitch) 

Like Ralf Weidauer likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events