logo
Home XtGem- Templates- XtScript- bottom
XtGemmanual

XtScript basics

get

GET (and POST) html form and query string variables
These can be read by Xtscript using the get and get_or_default commands.

Syntax

get var_name
get_or_default var_name;default_value[...] optional · ... your value

Notes

GET POST and Xtscript variables In HTML

This code will be replaced by the value of the GET or POST variable with var_name or the default value
{_$var_name|default value}
This code will be replaced by the value of the Xtscript variable with $var_name or the default value
{_$$var_name|default value}
If you use these codes within xtscript you may not always get what you expect

Example

<!--parser:xtscript-->
print In Xtscript<br/>
# get a variable
get func
print \$func = $func <br />

# get or use default value
get_or_default a_var;default_value
print \$a_var = $a_var<hr />
<!--/parser:xtscript-->

In html <br />
func = {_$func|}
<br />
$a_var = {_$$a_var|}

Copy as text

Output reload

In Xtscript
$func = get
$a_var = default_value
In html
func = get
$a_var =

Related

var debugging tools

XtGem manual · all sections

Powered by XtGem
About us Contact Forum top