define instruction

The define instruction declares a local variable that can be used in the HTML tag (the current element) and in its child elements. This variable is undefined outside of the current element.

Syntax

<tag gwc:define="var expression [; ...]" ...>
  ...
  </tag>
Note:
  1. var is the variable name
  2. expression is a template expression

Example

<div gwc:define="i menu">

i is set to the current item of a menu.