Solved

Integrating a custom data feed

  • 22 November 2021
  • 2 replies
  • 171 views

Badge +2

I’m having trouble getting the for loop working to access the items inside my custom XML data feed.

 

Here is what the data feed looks like (and yes it has been validated in Klaviyo):

 

 

And here is the code I have tried:

 

{% for post in feeds.oculizm.data.posts %} in the loop
<table style="display:inline-block; margin-left:auto; margin-right:auto">
    <tbody>
        <tr>
            <td style="padding-right:15px;padding-left:18px; width:150px"><a href="https://hipstiks.com/pages/shop-her-style?oculizm_post_id={{ post.post_id }}"><img src="{{ post.img_url }}" style="margin: 1px; max-width: 150px; height: auto;" /> a link post_id {{ post_id }} {{ post.post_id }}</a></td>
        </tr>
    </tbody>
</table>
{% endfor %}

 

But the preview email I receive doesn’t show any table.

 

Thanks for your help!

icon

Best answer by stephen.trumble 26 November 2021, 20:32

View original

2 replies

Userlevel 7
Badge +60

Hey @retention !

Would you know how to help @seanhalley ? When it comes to custom coding, I am a bit out of my depths. 

Userlevel 7
Badge +60

Hey @seanhalley 

While Klaviyo only supports our native integrations, you can reach out to one of our Agency Partners for help with this custom coding!

Thank you so much for being part of the Klaviyo Community!

Reply