How to inject CurrentDate as pre-fix in page title?

I'm trying to create a corporate meeting template form scratch but can't find a way to inject CurrentDate as pre-fix in the page title? Just like the Default Meeting Notes Template does.

/Ole Kristensen

3 answers

0 vote
Colin Goudie Community Champion Apr 24, 2013

Not sure if you're looking into doing this a Confluence Blue Print, but if you are, there is some details on dynamic page titles with them

https://developer.atlassian.com/display/CONFDEV/Writing+a+Blueprint+-+Intermediate#WritingaBlueprint-Intermediate-a.User-specifiedPageTitles

Thanks Colin, but I'm not a developer, so I was hoping for a Template solution. We have Scaffolding installed if that would be of any help.

Hi Ole,

I have a user-macro to do something very similar to what you want to achieve:

## @param pageTitle:title=Page Title|type=string|desc=description|required=true
#set($newTitle=$parampageTitle)
$content.setTitle($newTitle)

On the Confluence page I have two text-data fields 'Field1' and 'Field2' and my user-macro 'settitle' that reads the content of these text-data fields and deliver their values to the user-macro. The user macro sets the page title:

{text-data:name=Field1|atlassian-macro-output-type=BLOCK|type=line}{text-data}

{text-data:name=Field1|atlassian-macro-output-type=BLOCK|type=line}{text-data}

{settitle:pageTitle=%data:MyDate% - %data:MyTitle%}

You need the CustomWare Scaffolding plug-in to do that.

I hope that'll be helpful for you!

Good luck!

Stefan

Maybe this plugin will help. Haven't tried this out yet with current Confluence. I have used it with old version which worked nicely.

https://marketplace.atlassian.com/plugins/com.adaptavist.confluence.createpage#reviews

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Tuesday in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

463 views 19 9
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