How do I add variables in a Confluence template?
Asked by Bob Ashforth:

I want to add variables to my template so that the user will be prompted to enter values when creating a page from the template.


Answers:
author: Andrew Cohen
body: Thanks just fat fingered the keyboard. Got it figured out

comments: author: Shannon S
body: Thank you for letting me know, Andrew!

Take care,

Shannon


author: Shannon S
body: Hi Bob,

You can add variables following this procedure:

* [Create a template \> Template variables](https://confluence.atlassian.com/doc/create-a-template-296093779.html#CreateaTemplate-Templatevariables)

In summary,
> When you add variables to your template, they will act as form fields. When you create a page based on a template, you'll see a text entry box for each field. Enter data into each field, and it'll be added to the page.
>
> You can add the same variable more than once in the same template, which is useful if you need the same information in more than one place on the page.
>
> **To insert a variable into a template:**
>
> 1. Choose **Template** \> **New Variable** from the editor toolbar (or choose an existing variable to add it to the page)
> 2. Enter a name for the variable
> 3. Press **Enter** (by default this will create a single-line text input field)
>
> Please read the entire article for the full set of instructions.

Let us know if you have any trouble!

Regards,

Shannon

comments: author: Andrew Cohen
body: Hmm I might be missing this but when I add a variable it just puts a ? mark on the screen. Is there any other way?


author: Shannon S
body: Andrew,

Can you tell me what version of Confluence you are using when this happens?

Shannon


author: Marcel Kleinl?tke
body: How do I "reuse" an existig variable on the same template. Copy and paste and else?


author: Marcel Kleinl?tke
body: or how do I define gloabl placeholders for several templates/bluepringts


author: Bruce Fratto
body: Here's an overview of lists...

[Create a Template \| Confluence Data Center and Server 7.19 \| Atlassian Documentation](https://confluence.atlassian.com/doc/create-a-template-296093779.html#CreateaTemplate-Templatevariables)


author: Marcel Kleinl?tke
body: Is there any way to define areas of dates... like a week from Monday to Friday defined by one selscted date or the creation date or is there a list of the possibilities?  

Is there a way to have a pagetree where the mother page shows the content of the newest or upcoming time area? Like a mother page that shows in a 4 tables the entries of that table of the 4 subpages?

comments: author: MI
body: Have you tried solving this with a page property macro? You add a table on your page and have another page with the page properties Report macro showing all the attributes in a table.


author: Marcel Kleinl?tke
body: I did it with ConfiForms and several ITTTF Fields that calculated the date of the next and the next next day to insert those values in the table header.


author: MI
body: I wonder how the standard templates manage, that there is the name of the author. Is there any way, that I can achieve this in my own template?

comments: author: Marcel Kleinl?tke
body: Template Placeholder should be working


author: Andrew Cohen
body: No problem and thanks I appreciat the help


Tags: atl-gruland