%getlocalvar keyword (SDL script)
This keyword gets the value of a local variable. A local variable can exist only in the context of the generation template for which the local variable is declared.
|
Before using a local variable, you must declare it using the %localstring or %localnumeric keyword. You can set the value of a local variable through the %setvar keyword.
|
Syntax
%getlocalvar "<name of variable>"
In this example, the %getlocalvar keyword is used to return the value of the nIsAnonymous local variable. If the nIsAnonymous local variable equals 0, the Description.sdl generation template is loaded.
%if %getlocalvar "nIsAnonymous" == 0 %then
%load "Description.sdl"
%endif