This documentation relates to an early version of Confluence.
For documentation on the latest Confluence release, please go to the documentation home page.

Basic Introduction to Velocity

All Versions
Click for all versions
Confluence 2.5.4 to 2.5.8 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

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

Labels

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