The best source of information about OpenACS remains the main web site at www.openacs.org. An introduction to the templates can be found at openacs.org/doc/openacs-4/templates.html, but the best documentation can be found in every OpenACS installation's built-in documentation reader under the heading, acs-templating. Also, be sure to check the API browser that comes with OpenACS, which documents ad_page_contract in great detail.