Why does variables from a custom template do not appear on page
Asked by Ananth Subramanian:

Hi,

I created a template and add certain variables to it. But when I try to create a page from it the page appear blank. This question has been raised before as well but I could not see an answer to resolve this. Can someone help?

Regards

Ananth


Answers:
author: Alex Koxaras _Relational_
body: Hi [@Ananth Subramanian](/t5/user/viewprofilepage/user-id/5180316) and welcome to the community,

Can you please post a screenshot of your template, as well as a screenshot of when you try to create a page with that template (prior of publishing it)?

comments: author: Alex Koxaras _Relational_
body: [@Ananth Subramanian](/t5/user/viewprofilepage/user-id/5180316) thank you for sharing the images. Can you also please share your template while editing it? What type of variables did you use in it?


author: Alex Koxaras _Relational_
body: On my instance variables are working just fine:

1, While choosing the template {#toc-hId--470712401}
----------------------------------------------------

![template01.png](https://community.atlassian.com/t5/image/serverpage/image-id/248160iF72CF7C42FCE25EA/image-size/large?v=v2&px=999 "template01.png")

2 Before publishing it {#toc-hId-2016800432}
--------------------------------------------

![template02.png](https://community.atlassian.com/t5/image/serverpage/image-id/248159iE323CDA355DFFCF1/image-size/large?v=v2&px=999 "template02.png")

3. After publishing it {#toc-hId-209345969}
-------------------------------------------

![template03.png](https://community.atlassian.com/t5/image/serverpage/image-id/248158i88842338B51452F1/image-size/large?v=v2&px=999 "template03.png")

I would advise you to try the following:

* Remove all the square brackets from the variable names. Don't user special character
* Keep ONE name on the variable, or in case of many words use either hyphen (_) or minus/dash (-) to connect words
* For closed variables it's best to use the list variable, rather than the text

Do the above and let me know if that solved your problem.


author: Ananth Subramanian
body: Hi Alex,

good catch!! after removing special characters I can get the template to produce the desired result. Super thanks!!

Additionally, is it possible to have this directly appear in the title of the page instead? if that is not possible then how to automatize title of the page when you create a page from a template?

ps: should i raise this a separate question?? please let me know


author: Alex Koxaras _Relational_
body: HI [@Ananth Subramanian](/t5/user/viewprofilepage/user-id/5180316)

No you can't have it directly on the title.

To automate it, the only thing I can think of is to use (if you are on a premium plan) an automation to send a web request using the REST API and change the title. But it's too fuss...


author: Ananth Subramanian
body: thanks Alex for your help and time :)


author: james
body: This is a known bug. In many cases, removing special characters does not fix the issue. I can create text variables and enter only a single letter with no spacing, special characters etc. and it doesn't show up when editing the page.

For anyone looking for a solution rather than a workaround, add your vote to this bug report:  
<https://jira.atlassian.com/browse/CONFCLOUD-66456>


author: Ananth Subramanian
body: Hi Alex,

I share an example of the first variable -and it is the same for all the other variables as well. I hope this is what you meant

template_in_edit_mode

![template_edit.png](https://community.atlassian.com/t5/image/serverpage/image-id/248153i92FAACC19F7E48E7/image-size/large?v=v2&px=999 "template_edit.png")

Variable_type

![template_type.png](https://community.atlassian.com/t5/image/serverpage/image-id/248152iC63572B691A3312F/image-size/large?v=v2&px=999 "template_type.png")


author: Ananth Subramanian
body: Hi,

Thanks for the reply. please find below what you asked for

**Template** -

![template.png](https://community.atlassian.com/t5/image/serverpage/image-id/248134i9A9E8E01C9FE955F/image-dimensions/431x251?v=v2 "template.png")

- creating page from the template by filling in the variables (before clicking on "create button")

![create_page_template.png](https://community.atlassian.com/t5/image/serverpage/image-id/248135i44D14E929D0758C2/image-dimensions/418x211?v=v2 "create_page_template.png")

- page from the teamplate before publishing but after clicking on "create" button

![create_page_template_before publish.png](https://community.atlassian.com/t5/image/serverpage/image-id/248136iCD6B6EDD31EAB545/image-dimensions/472x281?v=v2 "create_page_template_before publish.png")


Tags: cloud

confluence-cloud

template