{% with blog_post.related_blogs as related_posts %} {% if related_posts %} {% endif %} {% endwith %}