Percent-Substitution Keys

T
he following are the keys for URL substitution:
scheme
scheme of the current request (http or https)
server
current server name (e.g. www.cs.uchicago.edu)
wwwroot
e.g. http://www.cs.uchicago.edu
script
URL of the current script (without args_path)
path
URL of the current script (with args_path)
full
Full current URL
secure
Full current URL, but with 'https' scheme.
documentation
The root of the documentation tree
fn:arg
Result of function url_fn(arg, self) (see below)
fn!arg
Result of the function url_fn(extra[arg], self) (that is, look up arg in the extra dictionary, and use the result as the argument to url_fn.
/foo/bar/baz
urls['wwwroot'] + '/foo/bar/baz' (that is, a path relative to /)
bar
urls['path'] + '/bar' (that is, a path relative to the URL of the current script and arguments)
bar/baz
urls['path'] + '/bar/baz' (same)
^bar
urls['script'] + '/bar' (that is, a path relative to the URL of the current script and arguments)
^bar/baz
urls['script'] + '/bar/baz' (same)
!xyz
extra['xyz'] (that is, just look up the value in the extra dictionary)

The functions available are:

i:name
URL of the image (in docs/i)
file:filename
URL of the indicated file (in docs/files)
sect:section
URL for one of the sections (tabs at the top of the page)
person:login
URL of the indicated person's person-page.
special:spec
URL for this script with special action spec.
temppass:tp
URL for login with the temporary password TP. (see logins and sessions)
action:
Action URL for the current page, ready for the next action.
project:proj_id
URL for the project with ID proj_id.
lab:lab_id
URL for the laboratory with ID lab_id.
mode:mode
URL to send the user to mode mode.
techreport:rep_id
URL for techreport with identifier rep_id.
secure:url
Secure version of URL (e.g., replace http: with https:).
insecure:url
Insecure version of URL (e.g., replace https: with http:).
native_secure:url
Secure version of http://www.cs.uchicago.edu/info/services/website/aside/percentsubkeys/foo if the current request is secure, otherwise the insecure version of http://www.cs.uchicago.edu/info/services/website/aside/percentsubkeys/foo.
docpath:dp
URL of documentation path dp.
aside:as
URL of documentation aside as.