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

Documentation on "scripting"-type instructions used in confluence

Chris Severn Nov 27, 2011

In some online examples of formatting etc, I see that there is some sort of language which can be used inside confluence pages (inside the layout pages at least).

For example, on this page:
it has commands like:
#if($action.isPrintableVersion() == false)
#includePage($helper.spaceKey "TreeNavigation")

I haven't been able to find the documentation for all the available scripting commands like these, or for the member functions provided by "$action" for example.

Can I used these sort of commands in any page, or only on page layout boxes? Can I use them in the sidebar code in the documentation theme?

Is there a command to get the current page title being shown, so I can check which page I'm on, and show a different sidebar for various pages? Or, even better, for the sidebar code to retrieve some variable which is defined on the current page, and to choose what to display based on that ?

Thanks for pointing me towards any documentation for this.

1 answer

1 accepted

1 vote
Answer accepted
Sander Brienen Nov 27, 2011

The "scripting" code you see are Velocity macros. Confluence uses Apache Velocity as their templating engine. These macros can only be used in Velocity template files and not in normal Confluence wiki pages.

See here for more information:

And here for the Velocity project page:

Chris Severn Nov 28, 2011

Thanks Sander. I'd seen a few mentions of Velocity previously, but never really found the main page that gives the basics of what it is, and how it's used in Confluence.

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

Confluence CVEs and common questions

Two vulnerabilities have been published for Confluence Server and Data Center recently: March 20, 2019 CVE-2019-3395 / CVE-2019-3396 April 17, 2019 CVE-2019-3398 The goal of this article is...

972 views 0 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