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 template path


Go to End
Reply

14 Posts   2741 Views

Avatar
firstpixel

2 August 2010 at 5:33pm Community Member, 16 Posts

I am running newsletter v0.4.0-rc1 on 2.4 and having some trouble with the template. I created the template Newsletter.ss in the folder email. But no matter where I put the folder (themes/xxx/templates/, newsletter/templates/, or even mysite/) I don't get anything in the selectbox in the admin. I tried to set the paths in the configs both with $template_paths and $template_path.

There is a function in the NewsletterAdmin.php which even should get the templates without setting the path in the config. Why then do I only have "None" in the template selectbox?

Has anyone managed to run the newsletter module on 2.4 with a custom template?

Thanks a lot.

Avatar
Mad_Clog

2 August 2010 at 7:31pm Community Member, 78 Posts

Try /mysite/templates/Email
Also, don't forget to ?flush=1 just to be sure

Avatar
firstpixel

3 August 2010 at 10:34am Community Member, 16 Posts

Doesn't help. I still don't get any template selection.

Avatar
Mad_Clog

3 August 2010 at 7:30pm Community Member, 78 Posts

Well i just did a little test adding a file 'test.ss' to said folder.
When i logged into the CMS, i could pick 'test' from the template dropdown.
So it IS working here...

Avatar
MarcusDalgren

3 August 2010 at 8:42pm Community Member, 288 Posts

This is probably a version issue. I'm running on the latest version of ss (2.4.1) and newsletter module and I'm getting the same issue. Dumping out some of the variables I noticed that the theme is not set when AJAX requests are sent and there's a bug report for it [url=http://open.silverstripe.org/ticket/5872]here[/url].

Mad_Clog can you tell us which version you're running on?

Avatar
MarcusDalgren

3 August 2010 at 8:48pm Community Member, 288 Posts

A workaround for the Newsletter module is to move your newsletter templates to your project folder instead. It checks for templates in project-folder/templates/email and project-folder/templates/Email as well after checking the theme folder (which isn't working right now).

Avatar
Mad_Clog

3 August 2010 at 9:08pm Community Member, 78 Posts

I'm running SS 2.4.1 and for the newsletter module I'm using the latest trunk build (if i remember correctly)

Avatar
firstpixel

4 August 2010 at 9:06am Community Member, 16 Posts

It's running now on my website:

The template must be locaded in "mysite/templates/email", in my case it's named "Newsletter.ss".

I went to the database with PhpMyAdmin and in the table "NewsletterType" I put "Newsletter" into the field "Template".

Not very nice but I needed to get it running now. With the next installation I will try again and hopefully it will run straight away...

Thanks.

Go to Top