Percent Substitution
| H |
- wwwroot
- The base URL of the current server, e.g., http://www.cs.uchicago.edu.
- sect:blah
- The URL of [section] blah. For example, %(sect:events)s generates http://www.cs.uchicago.edu/events, the URL for the Events section.
- person:foo
- The URL of the person page for the person with login foo. For example, %(person:dustin)s generates http://www.cs.uchicago.edu/people/dustin, the URL for Dustin's person page.
The URLs generated by these keys can be extended easily like this: %(sect:info)s/services translates to the URL of the computing services page, which is the URL for the Info section followed by a slash and 'services'. Alternately, this can be written %(/info/services)s, where the initial slash starts at %(wwwroot)s automatically.
It's important to use percent-substitution, because it ensures that the URLs turn out right for the user whether she's logged in or logged out, and whether she's using the main virtual host or a development virtual host. It also allows programmers to change URLs later, and be sure that everything still points in the right direction.

