parents-merge 33138 - Added IsEmail boolean to email templates

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@45039 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2007-11-19 01:14:10 +00:00
parent 5d6a4df183
commit f246e4fbe2

View File

@ -126,13 +126,21 @@ class Email extends ViewableData {
"From" => $this->from,
"Subject" => $this->subject,
"Body" => $this->body,
"BaseURL" => $this->BaseURL()
"BaseURL" => $this->BaseURL(),
"IsEmail" => true,
));
} else {
return $this;
}
}
/**
* Used by SSViewer templates to detect if we're rendering an email template rather than a page template
*/
public function IsEmail() {
return true;
}
/**
* Load all the template variables into the internal variables, including
* the template into body. Called before send() or debugSend()