any variable like $currentuser can be used within "Title" Value

This question is in reference to Atlassian Documentation: Create from Template Macro

 

any variable like $currentuser can be used within "Title" Value like $currentDate

2 answers

This widget could not be displayed.
Joe Clark Atlassian Team Jan 08, 2016

This documentation should help you:

https://developer.atlassian.com/confdev/development-resources/confluence-architecture/confluence-internals/velocity-template-overview/confluence-objects-accessible-from-velocity

The current user is available in a variable called $remoteUser. To get the current date, you can use $dateFormatter.currentDate

 

 

Hello Joseph,

in our company we're trying to make the entry to confluence as easy as possible. To do so, we created a template that allows users to follow certain steps, when starting to wright content into confluence. We thought, it would be nice, if users don't need to type their names and the current date. Unfortunatly the variables you suggested do not work ($remoteUser and §dateFormatter.currentDate). Additionally we would like to have a certain field called "title" to automatically put whats typed here as page title. Is their any way to do that? Thanks in advance!

 

Nadja

This widget could not be displayed.

Hi,

If you like to used standard confluence pages as templates or blueprints and use different kind of variables in a simple way (e.g. __Current_User__, __Current_date__, __Template_Version__), then you should have a look at our plugin Page Tree Creator.

Marketplace Link : Page Tree Creator

Regards,
Stephan

The following example displays the current user’s company name, as well as the status of the current user (which returns a Boolean value).

1<apex:page>
2  <h1>Congratulations</h1>
3   This is your new Apex Page
4   <p>The current company name for this
5      user is: {!$User.CompanyName}</p>
6   <p>Is the user active? 
7      {!$User.isActive}</p>
8</apex:page>

Tutuapp 9Apps Showbox

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday 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...

202 views 2 4
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