Closed ghost closed 12 years ago
i guess a quick way to solve this would be to simply add a $objTemplate->setData($objNewsletter); which will pass all newsletter data to the mail_default.tpl, then the above can be replaced with:
http://www.thyon.com/newsletter-reader/<?php echo $this->alias; ?>.html
--- Originally created by thyon on October 4th, 2010, at 03:21pm
--- Originally completed on November 19th, 2010, at 10:36pm
Hi leo
I've written a small piece of code that will allow you to add Newsletter object data into simple tokens. The most useful one I've found it to have a simpletoken in the mail_default.tpl, template:
http://www.thyon.com/newsletter-reader/##alias##.html
this will then allow you to embed the dynamic link to the current newsletter, without having to write it into the body... It belongs in the footer together with the unsubscribe link.
In this way, it would also be possible to add ANY field, because of the way you wrote parseSimpleTokens, so we just need another call to the function for newsletter object (not just recipients).
Then when someone extends the Newsletter with a new variable, that can also be used within the newsletter, in a similar way you can extend Memebership and add the ##firstname##.
--- Originally created by thyon on October 3rd, 2010, at 02:18am (ID 2596)