Liquid URLs and hyperlink in Email

New Member
8 0 0

Hi, 

 

I am using liquid for my weekly newsletter which contains listings update. I want to redirect to the product itself via a hyperlink. 

However, the hyperlink does not redirect properly. 

 

Here is the part with the hyperlink which does not work well: 

                                <a href="{{ 'https://www.hallocasa.com/property?id=' | append: result.id }}" target="_blank" style="font-family: Arial, sans-serif; color:#ffffff; display: inline-block; text-decoration: none; line-height:44px; width:200px; font-weight:bold;">

 

Is there anyone who knows how to make sure that it gets redirected properly?

 

Thanks a lot in advance!

 

Best regards

0 Likes

Hi,
Which service are you using to send the newsletter?

Richard | Front-end Dev @ PageFly
- Click 'Like' to let me know you like my answer!
- Are you having problems building Shopify stores? Check out PageFly - An Advanced Page Builder whose goal is to empower anyone to build a perfect store.
0 Likes
New Member
8 0 0

Hi Richard,

 

thanks a lot for your reply! I highly appreciate it!

 

We are using autopilot: autopilothq.com

0 Likes

@hallocasa 

unfortunately, the liquid code works with Shopify newsletter only. .

Richard | Front-end Dev @ PageFly
- Click 'Like' to let me know you like my answer!
- Are you having problems building Shopify stores? Check out PageFly - An Advanced Page Builder whose goal is to empower anyone to build a perfect store.
0 Likes
New Member
8 0 0

hm, not really according to Autopilot. Autopilot is using liquid officially to enable it. We have been using quite successfully and it works properly except for the hyperlink.

 

listing newsletter.JPG

0 Likes

Can you give me the full email content?

Richard | Front-end Dev @ PageFly
- Click 'Like' to let me know you like my answer!
- Are you having problems building Shopify stores? Check out PageFly - An Advanced Page Builder whose goal is to empower anyone to build a perfect store.
0 Likes
New Member
8 0 0

yeah, but how?

 

you mean the code or the final email?

0 Likes

Just paste into this topic, the liquid code that you add into Autopilot

Richard | Front-end Dev @ PageFly
- Click 'Like' to let me know you like my answer!
- Are you having problems building Shopify stores? Check out PageFly - An Advanced Page Builder whose goal is to empower anyone to build a perfect store.
0 Likes
New Member
8 0 0

final email.JPG

0 Likes
New Member
8 0 0
<style> 
  @media screen and (max-width: 630px) {
    .container {width: 100% !important;}
    .mobile {width: 50% !important;}
  }
</style>

<table width="100%" cellpadding="0" cellspacing="0" border="0" class="wrapper" bgcolor="#FFFFFF">
  <tr>
    <td align="center" valign="top">
      {% json https://www.hallocasa.com:64649/hallocasa-api/api/notifications/TO_USER__WEEKLY_PROPERTIES?token=...%}
      {% for result in json.body.properties %}
        <table width="600" cellpadding="0" cellspacing="0" border="0" class="container">
          <tr>
            <td width="50%" class="mobile" align="center" valign="top">
              <img class="fix" src="https://s3.amazonaws.com/images.hallocasa.com/properties/mini/{{ result.image}}" width="255" height="200" border="0" alt />
            </td>
            <td width="50%" class="mobile" align="left" valign="top">
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td class="bodycopy">
                    <table>
                      <tr>
                        <td><h4>{{ result.title }}</h4></td>
                      </tr>
                      <tr>
                        <td>{{ result.market_price}} {{ result.market_price_currency }}</td>
                      </tr>
                      <tr>
                        <td>{{ result.city }}, {{ result.country }}</td>
                      </tr>
                      <tr>
                        <td>{{ result.property_proposal }}</td>
                      </tr>
                    </table>
                  </td>
                </tr>
                <tr>
                  <td>
                    <table class="buttonwrapper" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td class="button" height="45" style="color: #000000">

                          <table width="200" cellpadding="0" cellspacing="0" border="0" bgcolor="#0c58a6" style="border-radius:4px;">
                            <tr>
                              <td align="center" valign="middle" height="44" style="font-family: Arial, sans-serif; font-size:14px; font-weight:bold;">
                                <a href="{{ 'https://www.hallocasa.com/property?id=' | append: result.id }}" target="_blank" style="font-family: Arial, sans-serif; color:#ffffff; display: inline-block; text-decoration: none; line-height:44px; width:200px; font-weight:bold;">
                                  Visit
                                </a>
                              </td>
                            </tr>
                          </table>
                        </td>
                      </tr>
                    </table>
                  </td>
                </tr>
              </table>
            </td>
          </tr>
        </table>
       <hr />
      {% endfor %}
     </td>
  </tr>    
</table>

    


i removed the token

0 Likes