Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Page Title in template

Alexander Wolden January 31, 2013

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

1 vote
Answer accepted
Bob Swift
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 31, 2013

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
Alexander Wolden January 31, 2013

Thanks for the reply.

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

## @noparams
$content.title

Ian December 6, 2017

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 Wolden 

Michal Mrazek
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 24, 2021

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.

MiMi Lane
Contributor
June 14, 2021

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.

0 votes
Daniel Borcherding
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 31, 2013

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.

MiMi Lane
Contributor
September 21, 2020

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 • 8 people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events