Dashboard > Confluence User Guides and Documents > ... > Velocity Template Overview > Basic Introduction to Velocity
Basic Introduction to Velocity Log In   View a printable version of the current page.

Added by jnolen, last edited by smaddox on Jun 25, 2007  (view change)
Labels: 

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 User Guides and Documents) Labels: velocity-related
Confluence Objects Accessible From Velocity (Confluence User Guides and Documents) Labels: velocity-related
Confluence rendering pipeline (Confluence User Guides and Documents) Labels: velocity-related
Customising Layouts (Confluence User Guides and Documents) Labels: customising-looknfeel, velocity-related
Disable Velocity Caching (Confluence User Guides and Documents) Labels: velocity-related
DEMONSTRATION LICENSE - This Confluence site is for demonstration purposes only. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.6.1 Build:#916 Nov 09, 2007) - Bug/feature request - Contact Administrators