How to dynamically include structured content from other pages into a template?
Asked by Jens Jakobi:

Hi,

I am using Confluence server and I am looking for a way to include content from one page into another page dynamically.

I want to create a page A from a template which includes a list or dropdown with dynamic content. I want to maintain this dynamic content in a table on another page M. When I create multiple pages (A, B, C) from my template and add or remove a table row of the table on page M, all created pages (A, B ,C) shall be updated. Ideally the template works like a form where the user selects the desired values in a list and is not bothered with the details of the page construction. Additionally the pages A, b and C shall react to changes of the template. When I change the template, I would like to have these changes reflected on the pages A, B and C.

Example:

I create a page "Billing Software" as an application information poster using a template. This template includes an area where I have to say something about the data objects which are used by this application. The data objects are given in a multi-select/list/dropdown and I can choose which objects are used.  
The items in the list are coming from the page "Data Objects" in the same space where I maintain a table which describes all data objects in detail. I have a list item in my template per table row on page "Data Objects". When I add a table row for the data object "Invoice" the object becomes available in the list of data objects on page "Billing Software".  

Does anybody know how to achieve this in Confluence? Of course I would like to have a solution which is later portable to the cloud, so the needed addons should be available in both worlds. I am happy with every solution idea, so please just feel free to share your toughts :)

Update: added the forms requirement and the dynamic template requirement

best regards,

Jens


Answers:
author: Jens Jakobi
body: I was able to create a fitting solution using the [ConfiForms](https://marketplace.atlassian.com/apps/1211860/confiforms-data-forms-workflows?hosting=server&tab=overview) addon. It was quite easy after a small learning phase and the devs were relly helpful. Thanks again to [@Alex Medved _ConfiForms_](/t5/user/viewprofilepage/user-id/781630) for your patience!

With ConfiForms I was able to create confluence pages and jira issues as needed, copy information from confluence pages to jira issues and vice versa, create a maintainable storage design for my data, create all needed forms for data input and present all this in a modern UI with a lot of possibilities.

It now integrates with the [Scaffolding Forms and Templates](https://marketplace.atlassian.com/apps/190/scaffolding-forms-templates?hosting=server&tab=overview) addon and now I am also able to use the LiveTemplate feature with ConfiForms.

Thanks for your suggestions :)

comments: author: Alex Medved _ConfiForms_
body: Awesome! Glad to help!


author: Katerina Kovriga {Stiltsoft}
body: Hi [@Jens Jakobi](/t5/user/viewprofilepage/user-id/4190128) ,

We can suggest using our [Table Filter and Charts for Confluence](https://marketplace.atlassian.com/apps/27447/table-filter-and-charts-for-confluence?hosting=server&tab=overview) app.

You can reuse your big M-page table with the help of the [Table Excerpt/Table Excerpt Include](https://marketplace.atlassian.com/apps/27447/table-filter-and-charts-for-confluence?hosting=server&tab=overview) macros and match your mini tables from the A, B, C pages by the common field to get its description automatically with the [Table Transformer](https://docs.stiltsoft.com/display/public/TFAC/How+to+use+Table+Transformer+macro) macro.

![Thu 3-1.png](https://community.atlassian.com/t5/image/serverpage/image-id/121662iBFF0490C57E89532/image-size/large?v=v2&px=999 "Thu 3-1.png")The first upper part of the screenshot goes to your template for A, B, C pages, the second part (the Table Excerpt macro) is an example of the M-page.

So, when you create a new page, you fill in its mini-table and automatically lookup it with the reused table from the M-page by the common column:

![Thu 3-2.png](https://community.atlassian.com/t5/image/serverpage/image-id/121665iB03BE916234640CA/image-size/large?v=v2&px=999 "Thu 3-2.png")![Thu 3-3.png](https://community.atlassian.com/t5/image/serverpage/image-id/121666iF6E6CBE188BAD9E2/image-size/large?v=v2&px=999 "Thu 3-3.png")With the help of the [Table Filter](https://docs.stiltsoft.com/display/public/TFAC/How+to+use+Table+Filter+macro) macro you can get rid of the empty rows:

![Thu 3-4.png](https://community.atlassian.com/t5/image/serverpage/image-id/121668iFD3EE807C1344FC8/image-size/large?v=v2&px=999 "Thu 3-4.png")**The second option** is to use the [Handy Macros for Confluence](https://marketplace.atlassian.com/apps/1214971/handy-macros-for-confluence?hosting=server&tab=overview) app and its Handy Statuses that allow you to set a predefined list of items (they can stand for your unique 'Data Objects') and change them in the view page mode:

![Thu 3-5.png](https://community.atlassian.com/t5/image/serverpage/image-id/121669i229EFB10CCC6D80A/image-size/large?v=v2&px=999 "Thu 3-5.png")The M-page table with a thorough item description should be kept on its own page. If a new 'Data Object' appears, its name should be added to the Handy Status item list.

Maybe you'll get some ideas from this answer.

Also note that the apps support both Server/DC and Cloud.

comments: author: Jens Jakobi
body: Hi Katerina,

thanks for the input, I will have a look at your suggestions!

best regards,  
Jens


author: Jens Jakobi
body: Hi Katerina,

we already have Table Filter and Charts for Confluence licensed, so it was easy to test your first solution.

With this addon I can achieve what I described, but it showed me, that my initial description was missing a part. I was able to create exactly what you suggested. My missing requirement here was, that I like would this to work like a form. When a user creates a page from the template, the template looks like technical template (not understandable for a lot of my users). It would be better if this would be like a form, where the user has to put in the information, click on a submit or save button and as a result the user gets a new page based on their inputs. In this form there should be the dynamic list which is based on the M-page.

So your first suggestion works, but my request was missing some information.

Your second suggestion seems to be a nice and easy way to change information on the page, but it seems to rely on static lists I have to maintain in the administration part of confluence and are not transparent to the user. Again I was missing some information. I would like the M-page to serve as a central source for my data objects and be accessible for all users. Here I describe all my objects and everybody cann see what object has which properties.

A combination of both would be nice though... where I can put the "table transformer macro" into a "handy select macro" or something like that, which works like your "handy status macro". I click on the value and can select on or multiple values to be shown.

I updated my question and added the requirement about the forms.


author: Katerina Kovriga {Stiltsoft}
body: Unfortunately, you can't combine Handy Macros with the first option - if you change the status from the view mode in the combined table, it will be changed in both source tables.

Maybe you should look for the [ConfiForms](https://marketplace.atlassian.com/apps/1211860/confiforms-data-forms-workflows?hosting=server&tab=overview) app. It seems to me that they have dynamic data forms. Besides this app is fully compatible with the Table Filter and Charts for Confluence app, it recognizes ConfiForms' macros as standard Confluence tables.


author: Jens Jakobi
body: Hi Katerina,

I will have a look at it!

Thank you!


author: Jens Jakobi
body: Hi [@Alex Medved _ConfiForms_](/t5/user/viewprofilepage/user-id/781630) ,

I saw you liking the answers, so I thought I will ask you here directly :)

I installed ConfiForms and I was partly able to achieve what I want. I have a page for my data objects, which looks like this:

![Unbenannt.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/121699i92C5141F95FC3BC9/image-dimensions/524x293?v=v2 "Unbenannt.PNG")

The page includes a form named myDataObjects. This page looks like this in view mode:

![Unbenannt2.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/121701iE0D90FFF33B22725/image-dimensions/526x224?v=v2 "Unbenannt2.PNG")

The Page "Datenobjekte" works fine. I also have a template which looks like this:

![Unbenannt4.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/121703iA952D450B4B30EB0/image-dimensions/537x158?v=v2 "Unbenannt4.PNG")

The page includes two forms, appcommoninfo and appdatainfo. In the ConfiForms Form Field Definition I used the Smart Checkbox and chose my Datenobjekte-page to be the source.

The created pages look like this in view mode:

![Unbenannt3.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/121704i8B4D75A030CED5A4/image-dimensions/536x169?v=v2 "Unbenannt3.PNG")

Now I have some questions:

* Regarding the (left) form appcommoninfo
  * Is it possible to restrict the form to only one record and always edit this first record when I click on the blue "Bearbeiten" button? Or is the dialog only capable of showing a "create" dialog? I would like to have an "create/edit" dialog for the first record. The record then includes several fields.
* Regarding the (right) form appdatainfo
  * I already have the form myDataObjects as a source, but is it possible to get a behaviour where I can select a record (with multiple ccplumns) from the myDataObjects form which is then displayed in the appcommoninfo form as a row? In my example I would like to have a row "Artikel" and a row "Rechnung" and the description from the myDataObjects form should be included too. Here I also need the behaviour to edit only the first record in the form and restrict the form to one record.

Thank you and best regards,  
Jens


author: Alex Medved _ConfiForms_
body: Hi

Better would be if you open a support ticket with us, but we can continue here as well...

1. This is a create dialog, but it certainly can be used as an edit (as you can set up the rules to lookup and set the values). But why not just to make an editable ConfiForms view there? See <https://wiki.vertuna.com/display/CONFIFORMS/Multiple+ways+to+show+your+form+data+in+Confluence+with+ConfiForms>

And yes, you can set up the rule to allow only ONE record per form. That is done by adding ConfiForms Field Definition Rules macro with validation across dataset selected as an action (condition would be something like _count:\>1)

2. Not quite sure about this question. I dont think I understand it. I just dont get you data model

Feel free to open support ticket with us and provide the storage formats for the page with form's definition

<https://wiki.vertuna.com/x/S4GW>

Alex


author: Jens Jakobi
body: Hello Alex,

thank you for your answer. I will open up a ticket!

best regards,

Jens


author: Monique Khairuliana[ServiceRocket]
body: Hi [@Jens Jakobi](/t5/user/viewprofilepage/user-id/4190128) , our [Scaffolding Forms and Templates](https://marketplace.atlassian.com/apps/190/scaffolding-forms-templates?hosting=server&tab=overview) can help you with this! It's currently available for Server, Data Center, and Cloud.

With Scaffolding, you can create a template form that contains a dropdown list. With the Live Templates feature, all the pages that use the template will be updated when there's a change in the original template.

Feel free to contact us and [book a demo](https://servicerocket.drift.click/04139def-35e4-43e9-9b78-813927524504) from us!

Cheers,  
Monique

comments: author: Jens Jakobi
body: Hi Monique,

thanks for your reply. We have [Scaffolding Forms and Templates](https://marketplace.atlassian.com/apps/190/scaffolding-forms-templates?hosting=server&tab=overview) licensed and here I am missing the possibility to easily get data from a page A and display it in a form as a list to chose from.

I would like to use your addon with ConfiForms, but it seems those two are not compatible to each other.

best regards,  
Jens


Tags: confiforms

confluence-server

server