New recipient tag for mail template

Discussion in 'Feature Requests' started by David, Oct 12, 2016.

  1. David

    David Administrator
    Staff Member

    Joined:
    Dec 1, 2015
    Messages:
    781
    Likes Received:
    31
    Mail template Available Tags for message recipient is :

    {{message.recipients}} — an array of the recipients

    but "{{message.recipient}} — single mail recipient" don't exist.

    Would be great if you can create it.

    For example to do do this phrase :
    {% when 3 %}
    <p>This email or download link can not be forwarded to anyone else. Only {{message.recipient}} can download the attachments.</p>
     
  2. David

    David Administrator
    Staff Member

    Joined:
    Dec 1, 2015
    Messages:
    781
    Likes Received:
    31
    [​IMG]
    Johan Allard March 01, 2016 20:12
    And what should {{message.recipient}} (singular) contain when there's multiple recipients? The template will be the same regardless of the amount of recipients used. It sounds like what you want to do is to check the size of the array or possibly only use the first entry in the array. Please have a look at filters here: https://github.com/Shopify/liquid/wiki/Liquid-for-Designers to see how you can manipulate the array.
     

Share This Page