Ok, here is what I came up with:
To use the doc var [*alias*]
Changed
assets>modules>temailer>ajax>send.php
Found in line 38 -> "//replace template variables for proper output".
Below line 40, I added:
$body = insert('alias', $doc['alias'],$body);
- Pretty straight forward
[*alias*] now works fine!
To use my template var [*newsletter_issue*]
Added the following right after the above fix in
assets>modules>temailer>ajax>send.php:
$tv=$modx->getTemplateVarOutput('newsletter_issue',$id,'1');
$body = insert('newsletter_issue',$tv['newsletter_issue'],$body);
Then got error saying that document.parser.class.inc.php (on line 1885) couldn’t include
manager/includes/tmplvars.format.inc.php
Looked at
document.parser.class.inc.php and found the line (1884) where the base path is set. Couldn’t figure out what was wrong
So I changed line 1884 to:
$baspath= $this->config["base_path"] . "/home/(mysharedserver)/domains/(mydomain)/html/manager/includes";
Now it works. Only thing is I don’t know if it’ll screw anything else up.
So far looks fine.