Handlebars.js - Show data only if {{ image_url}} doesn't contain "questionmark"
Hi,
As you can see in this example, which I created on Codepen, some of the data don't have an image and whenever there's no image, a place holder image is shown:
Handlebars.js Example
Is there any way in Handlebars.js to say that show the data only if the {{ image_url }} doesn't contain "questionmark"?
Something like this?
Code:
{{#each this}}
{{#if image_url !contains "questionmark"}}
<li class='list-container'>
<div class="image-container">
<img src="{{ image_url }}">
</div>
<div class="name-container">
{{ name }}
</div>
<div class='role-container'>{{{ role }}}</div>
</li>
{{/if}}
{{/each}}