Jump to:

11002 Posts in 2734 Topics by 1823 members

All other Modules

SilverStripe Forums » All other Modules » newsletter template path

Discuss all other Modules here.

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

Page: 1 2
Go to End
Author Topic: 2736 Views
  • firstpixel
    Avatar
    Community Member
    16 Posts

    newsletter template path Link to this post

    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.

  • Mad_Clog
    Avatar
    Community Member
    78 Posts

    Re: newsletter template path Link to this post

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

  • firstpixel
    Avatar
    Community Member
    16 Posts

    Re: newsletter template path Link to this post

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

  • Mad_Clog
    Avatar
    Community Member
    78 Posts

    Re: newsletter template path Link to this post

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

  • MarcusDalgren
    Avatar
    Community Member
    288 Posts

    Re: newsletter template path Link to this post

    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?

  • MarcusDalgren
    Avatar
    Community Member
    288 Posts

    Re: newsletter template path Link to this post

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

  • Mad_Clog
    Avatar
    Community Member
    78 Posts

    Re: newsletter template path Link to this post

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

  • firstpixel
    Avatar
    Community Member
    16 Posts

    Re: newsletter template path Link to this post

    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.

    2736 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.