logo
Home XtGem- Templates- XtScript- bottom
print and print_raw sends output to the page
[...] = optional ... = your value
print [...]
print is probably the most important command in Xtscript
In Xtscript print Certain characters and constructs are reserved
Show in textarea
<!--parser:xtscript-->
var $variable=test value
print Usually you only need to escape the first bracket<br />
print This \$variable and \(3+4) are escaped with &#92;<br />
print This "$variable" and "(3+4)" have not been escaped<br />
print The "get" variables break as \ is not a valid character here and the \$variable is escaped<br />
print {_$\$variable|default} and {_\$func|default}<hr />

#A direct function call prints the result
print Direct function call<br />
call strrev $val=$variable
print <hr />

# Use ; ;(semicolon space semicolon) for semicolons at the end of a print line 
print This will still work on some browsers but the ; will be missing in the source code &amp;
print <br />add a semicolon to an end of line entity &amp; ;

# Multi line print
print {{<br />printing
on multiple
lines<br />}}

# Print_raw 
print_raw {{print_raw prints 
everything like $variable and (3+4) unparsed<br />
it will still parse &lcub;{&nbsp;}&rcub; wrappers and "get" variables
"{_$$variable|default}" and "{_$func|default}"<br />
To show the text use an entity to replace {<br />
"&lcub;_$$variable|default}" and "&lcub;_$func|default}"}} 
<!--/parser:xtscript-->
Show in textarea
Reload
Usually you only need to escape the first bracket
This $variable and (3+4) are escaped with \
This "test value" and "7" have not been escaped
The "get" variables break as \ is not a valid character here and the $variable is escaped
{_$$variable|default} and {_$func|default}
Direct function call
eulav tset
This will still work on some browsers but the ; will be missing in the source code &
add a semicolon to an end of line entity &
printing on multiple lines
print_raw prints everything like $variable and (3+4) unparsed
it will still parse {{ }} wrappers and "get" variables "test value" and "print"
To show the text use an entity to replace {
"{_$$variable|default}" and "{_$func|default}"
Powered by XtGem
About us Contact Forum topÂ