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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

newsletter template path


Go to End


14 Posts   4842 Views

Avatar
firstpixel

Community Member, 19 Posts

2 August 2010 at 5:33pm

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

Community Member, 78 Posts

2 August 2010 at 7:31pm

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

Avatar
firstpixel

Community Member, 19 Posts

3 August 2010 at 10:34am

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

Avatar
Mad_Clog

Community Member, 78 Posts

3 August 2010 at 7:30pm

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

Community Member, 288 Posts

3 August 2010 at 8:42pm

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 here.

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

Avatar
MarcusDalgren

Community Member, 288 Posts

3 August 2010 at 8:48pm

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

Community Member, 78 Posts

3 August 2010 at 9:08pm

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

Community Member, 19 Posts

4 August 2010 at 9:06am

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