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

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
Document generated by Confluence on Dec 03, 2008 15:13