Include a comma separated list of external or internal Xtscript files at this point
[...] = optional ... = your value
include [site.domain/]folder/filename [ ,[site.domain/]folder/filename]
include multiple files with comma separated addresses
External files DO NOT require http://
included scripts have their own variables and do not use the main scripts variables
You cannot include using $variables
Partly due to the parsing order
and partly to stop malicious use.

Advanced users


You can access the variables in included files
but scripts in included files cannot access the variables in the main script
The variables in internal include files are accessed like this
@$var_name
The variables in external included files are accessed like this
your_site.xtgem.com@$var_name
If the $var_name is incorrect the text up to the $ will be displayed
You can get a list of the variables names by using the dump_vars function in the debugging tools
To use external variables in {_$$var_name|default} you will have to reassign it to a local variable first
<!--parser:xtscript-->
# Include the files
include /manual/basics/examples/filename.xt , your_site.xtgem.com/filename.xt
print <hr />
print <span>variable from included file</span><br />

# Get the variable from local include
print <b><span>@</span>\$var_name</b> = @$var_name <hr />

print <span>variable from external included file</span><br />

# Get the variable from external include
print <b>your_site.xtgem.com<span>@</span>\$var_name</b> = your_site.xtgem.com@$var_name

# You cannot "include" using variables
var $file=filename.xt
include /manual/basics/examples/$file
# This will not work
<!--/parser:xtscript-->
Show in textarea
Reload
success external include

variable from included file
@$var_name = variable value from included file
variable from external included file
your_site.xtgem.com@$var_name = Value from external site