XWiki Syntax Guide

Last modified by Ricardo Rodríguez Fernández on 2015/11/24 10:23

XWiki Syntax 2.1: Scripts

2.0 Scripts

In XWiki Syntax 1.0 it was possible to enter Velocity scripts anywhere directly in the page. This lead to issues for example when the user was involuntarily entering Velocity content. It was also performance hungry for pages not requiring Velocity content. There were several other technical limitations. Thus in XWiki Syntax 2.1 Velocity scripts must be entered using the velocity macro. Same goes for entering Groovy scripts.
FeatureXWiki Syntax 2.1
Velocity script
{{velocity}}
#set ($var = "whatever")
{{/velocity}}
Groovy script
{{groovy}}
def var = "whatever"
{{/groovy}}
Tags:
Created by Ricardo Rodríguez Fernández on 2014/08/04 10:08
    
This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 7.3 - Documentation