Get Page Title in template

I am looking to create a template that automatically pulls the page title and includes it in the content. Is there a variable/macro/shortcut that allows us to automatically pull the page title and include it in the content of the page?

2 answers

1 accepted

This widget could not be displayed.

There are multiple ways to do that including at least:

  1. Write a simple user macro
  2. Run Plugin - {run-now}$page_title{run-now}
  3. Reporting Plugin

Thanks for the reply.

I made a simple user macro that worked like a charm:

## @noparams


I used the above in my macro and I got the page title.

Now how can I get the first letter in a page title since my pages are named as follows: AF | Afghanistan

I only want to get AF?

@Alexander Wolde 

This widget could not be displayed.


It looks like Bob was able to point you at the 100% correct solution. I am answering here just to let people know that we have an outstanding feature request for this functionality.

If anyone is interested in getting this feature rolled into the product itself please visit that issue and vote for it in the upper right hand corner. I am attaching this post to the ticket to further increase it's visibility.

Your solution is a great one. Again I am just adding this for informational purposes.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 17, 2018 in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

599 views 8 6
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you