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

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

qingpei wang Jan 06, 2016

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

0 votes
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

 

 

Nadja Agreiter Apr 09, 2018

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

0 votes

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

athman abed Jul 05, 2018 • edited Jul 06, 2018

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
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Confluence

6 Awesome Ways to Apply Trello, JIRA and Confluence to your Project

I attended  Atlassian Summit 2019  and learned a lot from the presenters, attendees and knowledgeable Atlassian product managers. The presentations I attended focused on applying Agile, pla...

1,554 views 8 19
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