Contents
- Syntax
- Description
- Options
- f++ example
- n++ example
- Hard-coded variables
- Injecting file information
- Injecting pagination information
- Injecting project information
- Injecting operating system information
- Injecting date, time & timezone information
Syntax
The syntax for
$[string]
$[string]
Description
The
Options
The following options are available for
option | description |
---|---|
add |
|
do not round floating point values | |
option | description |
f++ example
Example of
int a=0 # following three lines are essentially the same console("a: ", a) console("a: ", $[a]) console("a: $[a]")
n++ example
Example of
@int a=0 @# following three lines are essentially the same @console("a: ", a) @console("a: ", $[a]) @console("a: $[a]")
Hard-coded variables
A number of hard-coded variables are available with both
Injecting file information
The following information about the output file being built can be injected:
type | syntax |
---|---|
name | |
title | |
output file path | |
output extension | |
content file path | |
content extension | |
script extension | |
template path | |
type | syntax |
For example in a file
<title>sitename - $[title]</title>
Injecting pagination information
The following information about pagination for the output file being built can be injected:
type | syntax |
---|---|
number of items to add per page | |
current number of pages | |
output file path | |
current page number | |
code injected between items | |
type | syntax |
Injecting project information
The following information about the project
type | syntax |
---|---|
content directory | |
output directory | |
default content extension | |
default output extension | |
default script extension | |
default template | |
type | syntax |
Injecting operating system information
The following information about the operating system
type | syntax |
---|---|
build operating system | |
call operating system | |
type | syntax |
Injecting date, time and timezone information
The following information about dates and times can be injected:
type | syntax |
---|---|
date of build | |
time of build | |
timezone of build | |
UTC date of build | |
UTC time of build | |
year of build | |
full year of build | date of call |
time of call | |
timezone of call | |
UTC date of call | |
UTC time of call | |
year of call | |
full year of call | date of loading |
time of loading | |
timezone of loading | |
UTC date of loading | |
UTC time of loading | |
year of loading | |
full year of loading | |
type | syntax |