Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » New template for my newwsletter

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 825 Views
  • ojalà
    Avatar
    Community Member
    87 Posts

    New template for my newwsletter Link to this post

    Hi! I try to insert a template form my newsletter.
    so in folder Mysite/template I create the folder Email and inside this, MyEmail.ss file whit the following code:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" >
       <head>
          <% base_tag %>
          <link rel="stylesheet" type="text/css" href="tutorial/css/layout.css" />
          <link rel="stylesheet" type="text/css" href="tutorial/css/typography.css" />
          <link rel="stylesheet" type="text/css" href="tutorial/css/form.css" />
       </head>
       <body>
          <div id="Main">
             <div id="Header">
                <h1>Template per la newsletter 2</h1>
             </div>
             <div id="ContentContainer">
                <div id="Content" class="typography">
                   $Content
                   $Form
                </div>
             </div>
             <div id="Footer">
                <span>Visit <a href="http://www.silverstripe.com" title="Visit www.silverstripe.com">www.silverstripe.com</a>; to download the CMS</span>
             </div>
          </div>
          $SilverStripeNavigator
       </body>
    </html>

    The problem is that newsletter's member recive the mail with the tempalte that I choose but not the tex of newsletter: Why? The textof newsletter is defined inside the CMS in administartion of Newsletter page..

  • Liam
    Avatar
    Community Member
    470 Posts

    Re: New template for my newwsletter Link to this post

    You're using the wrong variable. Use $Body instead of $Content.

    You can also access their first/last name by using $Member.FirstName and $Member.Surname

  • ojalà
    Avatar
    Community Member
    87 Posts

    Re: New template for my newwsletter Link to this post

    Thanks!
    I have an other question: when I try to insert an image (from html) in the mail of recipient I see a box whit the name of image but there is no the figure

  • ojalà
    Avatar
    Community Member
    87 Posts

    Re: New template for my newwsletter Link to this post

    Sorry you can indicate me how to find all the possible variable that I can use: ex. $body, $member,...
    thanks!

    825 Views
Page: 1
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.