addition of presentPageTemplate to take a template instead of a URL to avoid browser blocks on local XMLHTTP requests