Results 1 to 5 of 5

Thread: email templates - help!

  1. #1
    Rich Pedley's Avatar
    Rich Pedley is offline Hello World
    Join Date
    May 2009
    Location
    Liverpool, UK
    Posts
    92

    Default email templates - help!

    After several years using the same system, things are getting to complex and I need an easy way of handling things.
    I currently have little sections in a template like this:
    Code:
    --------------- DOWNLOAD DETAILS ---------------
    These are available for download via:
    {DOWNLOADS}
    --------------- OTHER INFORMATION (if applicable) ---------------
    {REFCOMM}
    I'm currently doing a simple str_replace to replace the bracketed sections.

    But what I want to do now, is to stop those little sections appearing if there is nothing to replace. Sort of like:
    PHP Code:
    if({DOWNLOADS}!='') print'--------------- DOWNLOAD DETAILS ---------------' etc... 
    But I have no idea on how to do this that is easy for joe public to actually use.

    erm help!

    the only thing I can think of is to have a textarea for each section, but that does seem cumbersome.

  2. #2
    Rich Pedley's Avatar
    Rich Pedley is offline Hello World
    Join Date
    May 2009
    Location
    Liverpool, UK
    Posts
    92

    Default

    no ideas then?

    hmmm.

  3. #3
    Ipstenu's Avatar
    Ipstenu is offline Big Tipper
    Join Date
    Feb 2010
    Posts
    368

    Default

    We'd probably need more information.

    What are you using to send out the email templates? A plugin?

  4. #4
    Rich Pedley's Avatar
    Rich Pedley is offline Hello World
    Join Date
    May 2009
    Location
    Liverpool, UK
    Posts
    92

    Default

    it's a small part of a larger plugin. Using native WP to send the mail out (wp_mail)

  5. #5
    Rich Pedley's Avatar
    Rich Pedley is offline Hello World
    Join Date
    May 2009
    Location
    Liverpool, UK
    Posts
    92

    Default

    argh - ok I think I've found a temporary solution... I'm just going to create a special template/new email for one of the sections. The others can stay as they are for now.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •