Template Manager Help {{variables}}

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Brad
    Junior Member
    • Mar 2024
    • 15

    Template Manager Help {{variables}}

    Hi there
    Hope all is well

    Can someone point me in the right direction here, please.

    Looking at the Meeting template - I want to include a message to the attendee Contact, how do I find out the correct variables to us or what variables are available for this template?

    Many thanks
    Brad


  • item
    Active Community Member
    • Mar 2017
    • 1500

    #2
    Hi,
    just verify for "message", i think it's in meeting ? not sure but something so : {{./message}} if message is a field in meeting.
    you can have doc on github with many sample



    PHP Code:
    
    <table cellpadding="1" cellspacing="1" style="width: 100%;font-size: 12px;">
    <tbody>
        <tr>
            <td style="width:30%;;background-color: rgb(198, 177, 28); color: #ffffff;">&nbsp;Name</td>
            <td style="width:70%;;background-color: rgb(198, 177, 28); color: #ffffff;">&nbsp;Message</td>
        </tr>
    <!-- {{#each contacts}} -->
        <tr>
            <td style="width: 30%;';background-color: #F5F2D9;">&nbsp;{{name}}</td>
            <td style="width: 70%;';background-color: #F5F2D9;">&nbsp;{{./message}}</td>
        </tr>
    <!-- {{/each}} -->
    </tbody>
    </table>
    If you could give the project a star on GitHub. EspoCrm believe our work truly deserves more recognition. Thanks.​

    Comment

    • Brad
      Junior Member
      • Mar 2024
      • 15

      #3
      Thank you, I am looking at adding this into the template
      #Admin/templateManager/name=invitation_Meeting

      I can add a custom field and that shows but I want to customise my email regarding a meeting or a call saying Dear ... Contact First Name


      Comment


      • item
        item commented
        Editing a comment
        sorry, can't help, never try something so.
        certainly other forumeur can help.
    • yuri
      Member
      • Mar 2014
      • 8669

      #4
      Hi Brad,

      They (placeholders) are the same as in PDF Templates. You can copy paste them.
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      • Brad
        Junior Member
        • Mar 2024
        • 15

        #5
        Hi Yuri
        Ah thank you - that was what I was looking for - BUT ... there is only one variable {{contactsNames}} - unfortunately the delivers [object Object] in the email - There are many placeholders containing User - before I settle in and try them all may I check if contacts are ever referred to as User ?

        Comment

        • rabii
          Active Community Member
          • Jun 2016
          • 1265

          #6
          hey Brad

          It is the same engine used for all. because contacts is a collection you will need to loop through it and get name as below

          PHP Code:
          {{#each contacts}} Contact name: {{name}} {{/each}} 
          
          Rabii
          Web Dev

          Comment

          • Brad
            Junior Member
            • Mar 2024
            • 15

            #7
            Hey rabii - Thank you very much .. bang on! works expected.

            Comment


            • rabii
              rabii commented
              Editing a comment
              you are welcome
          Working...