This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

simandjuntak26986
simandjuntak26986

Hi, I'm trying to figure out how I can succesfully show a version of an image, depending on the blog category. this is what I have so far:

{% if category.slug == 'highlight'  %}
       <img class="img_large"  src="{{ image.thumb(907, 'auto', {mode:'auto',quality:85}) }}" alt="{{ image.title != null ? image.title : post.title }}">
 {% else %}
       <img class="img_normal" src="{{ image.thumb(450, 'auto', {mode:'auto',quality:85}) }}" alt="{{ image.title != null ? image.title : post.title }}">
{% endif %}

The condition doesn't work. How can I set the condition to the value?

Thanks, John

Last updated

1-1 of 1

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.