This documentation relates to an early version of Confluence.
View this page in the current documentation or visit the current documentation home.

Basic Introduction to Velocity

All Versions
Click for all versions
Confluence 2.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

Confluence UI architecture (Confluence 2.8) Labels: velocity-related
Confluence Objects Accessible From Velocity (Confluence 2.8) Labels: velocity-related
Basic Introduction to Velocity (Confluence 2.8) Labels: velocity-related
Disable Velocity Caching (Confluence 2.8) Labels: velocity-related
What's the easiest way to render a velocity template from Java code? (Confluence 2.8) Labels: velocity-related, faq_conf_dev
Working With Decorator Macros (Confluence 2.8) Labels: velocity-related, customising-looknfeel
Customising Layouts (Confluence 2.8) 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.