New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feed works great until I add a template #369
Comments
Are you hosting your site on shopify, Jekyll or some other system that uses curly braces for templating? |
Yep. I'm using Craft CMS with Twig templates. Do I need to escape the curly braces somehow? |
Yes, you'll want to assign your template to a twig variable using {%set instafeed_template = '<a href="{{link}}"><img src="{{image}}" /></a>' %}
// further down your page
var feed = new Instafeed({
template: "{{instafeed_template}}"
// other settings
}); Twig docs: http://twig.sensiolabs.org/doc/tags/set.html#set See #41 for related issues. |
That worked with the modification of adding js output escaping tags in Twig like so:
Without the autoescaping the code block renders as a quoted string. |
Ah, sorry about that, I wasn't aware that extra directive was needed! Thanks for taking the time to go back and update this issue so other people can benefit from it! |
If you're working with Jekyll, as I was, you'll use:
|
How can we show video with play button, i am using default version of instafeed and it shows both image & videos but user gets confused as all items look like videos so i want to put play icon on top of those images whcih actually are images https://codepen.io/anon/pen/eyMpMQ for example in this example 6th items is video |
This works:
but this is not:
The template is rendering but the data is absent:
Any advice for troubleshooting this?
Thanks.
The text was updated successfully, but these errors were encountered: