Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Newsletter doesn't work


Reply

3 Posts   394 Views

Avatar
Lemonie

18 June 2012 at 4:06am Community Member, 70 Posts

I am finding it very frustrating as modules just don't work out of the box and almost always need tweaking and I'm new to this.

I have uploaded the Newsletter module. It says the next step is to add ...

In the _config.php, add: Email::setAdminEmail();{php} (This is the email address the newsletters are sent from. It can be overwritten on a per-type basis.)

If you have created a custom member class for the site, substitute it with the following line in the _config.php file: Object::useCustomClass("Member", "");{php}

When I add the the first code I get:

Parse error: syntax error, unexpected '}' in /var/sites/h/homelesshounds.org.uk/public_html/silverstripe-labs-silverstripe-newsletter-dd2e5a0/_config.php on line 17

Avatar
Lemonie

18 June 2012 at 5:07am Community Member, 70 Posts

I have gotten rid of the error by adding '' in the brackets. Now when I open the Newsletter section nothing happems no matter what I click. As far as I can see I am meant to click 'Create' but nothing happens.

Avatar
Lemonie

18 June 2012 at 5:44am Community Member, 70 Posts

Am trying to do the following but I don't have a templates file in my sites?

Templates are created in mysite/templates/email. So for example, if you created Newsletter.ss inside mysite/templates/email then the Newsletter system will recognise this new .ss file and let you select it in the dropdown.

This currently goes against the convention of keeping templates inside themes/yourtheme/templates/email. If you want to keep you templates inside the themes/yourtheme/templates/email folder rather then the default mysite/template/email then you need to set this line in your mysite/_config file

:::php
// set email template folder to themes/mytemplate/templates/email
NewsletterAdmin::$template_paths = "themes/mytemplate/templates/email";