Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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
$content.title

Hey,

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 

Hello, 
I needed to include the page title into the content of the page and can't use above steps - maybe newer version or permission limitations, but I was able to use Page Info macro.

Insert macro Page Info

  • Information type = Title
  • Page = $self
  • Type = Flat

 

Works for me. Hope this helps.

I appreciate the macros as a work-around.  That isn't a great option for very basic users, though. I still believe the template creation process should be updated so a default template title is saved - WYSIWYG.  Everything else is about the template creation is extremely user-friendly for even the most basic user.

Alexander,

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.

https://jira.atlassian.com/browse/CONF-13715

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.

It looks like this was not implemented. From an en-user POV, this really should be a requirement for allowing people to create custom templates. After all, if we are creating a custom template, the whole point is to be consistent.  Having to create a page title each time we use a custom template is counter-intuitive and very annoying. Any updates?

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

Confluence Mythbusters: Does Atlassian even use Confluence?

Hi, Confluence collaborators! As part of #Confluence-Collaboratory month, we’ve created a very special Mythsbusters segment, where we're dive into an interesting myth and uncover the truth behind i...

1,362 views 7 28
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you