This page last changed on Jun 24, 2007 by smaddox.

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.9) Labels: velocity-related
Confluence Objects Accessible From Velocity (Confluence 2.9) Labels: velocity-related
Confluence UI architecture (Confluence 2.9) Labels: velocity-related
Customising Layouts (Confluence 2.9) Labels: customising-looknfeel, velocity-related
Disable Velocity Caching (Confluence 2.9) Labels: velocity-related
What's the easiest way to render a velocity template from Java code? (Confluence 2.9) Labels: faq_conf_dev, velocity-related
Working With Decorator Macros (Confluence 2.9) Labels: customising-looknfeel, velocity-related
Document generated by Confluence on Aug 07, 2008 19:08