$templates = array("html" => CoreFactory::getTemplate(), "plain" => CoreFactory::getTemplate()); $templates["html"]->setTemplateFile(FUNDRAISING_PAGE_SET_UP); $templates["plain"]->setTemplateFile(FUNDRAISING_PAGE_SET_UP_PLAIN); foreach (array("html", "plain") as $templateType) { $templates[$templateType]->set("SITE_NAME", SITE_NAME); $templates[$templateType]->set("SITE_ADDRESS", SITE_ADDRESS); $templates[$templateType]->set("SITE_SUPPORT_EMAIL", SITE_SALES_EMAIL); $templates[$templateType]->set("SITE_SALES_EMAIL", SITE_SALES_EMAIL); $templates[$templateType]->set("NAME", $fundraisingPage->getRelationValue("MemberId", "Alias")); $templates[$templateType]->set("PAGE_TITLE", $fundraisingPage->getFormatted("PageTitle")); $templates[$templateType]->set("TARGET", $fundraisingPage->getFormatted("FundraisingTarget")); $templates[$templateType]->set("PAGE_URI", $fundraisingPage->get("PageUri")); }