This server will be upgraded at 3pm Sydney time on December 3rd (December 2nd, 8pm PST) and will be down for up to 30 minutes.
This documentation relates to the latest version of Confluence.
If you are using an earlier version, please go to the documentation home page and select the relevant version.

Basic Introduction to Velocity

All Versions
Click for all versions
Confluence 2.10 Documentation

Index

Example Usage

A variable in velocity looks like this:

 $foo 

To set a variable:

 

#set ($message = "Hello")

A basic if statement:

#if ($message == "Hello")
   Message received and is "Hello"
#end 
A velocity variable which evaluates to null will simply render as the variable name. See the Velocity User's Guide

Related Content

What's the easiest way to render a velocity template from Java code? (Confluence Docs 2.10) Labels: faq_conf_dev, velocity-related
Basic Introduction to Velocity (Confluence Docs 2.10) Labels: velocity-related
Disable Velocity Caching (Confluence Docs 2.10) Labels: faq_conf_dev, velocity-related
Customising Layouts (Confluence Docs 2.10) Labels: customising-looknfeel, velocity-related
Working With Decorator Macros (Confluence Docs 2.10) Labels: customising-looknfeel, velocity-related
Confluence Objects Accessible From Velocity (Confluence Docs 2.10) Labels: velocity-related
Confluence UI architecture (Confluence Docs 2.10) Labels: velocity-related

Labels

velocity-related velocity-related Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.