I created a custom blog post template that includes a custom module. I have also created a custom blog listing template. On the blog listing page, I would like to access an image that was added to the module, but it’s not one of the standard properties available on the blog object.
On the blog listing template, as I iterate over the content of plog posts, is there a way to get the image that I added to the post and use it on the blog listing page?
<ul id="blogs">
{% for content in contents %}
<li class="post-item {% for topic in content.topic_list %}{{ topic.slug }}{% if not loop.last %} {% endif %}{% endfor %}"
data-topics="{% for topic in content.topic_list %}{{ topic.slug }}{% if not loop.last %}, {% endif %}{% endfor %}">
<div class="featured-image" style="background-image: url({{ content.featured_image }})"></div>
<div class="post-title-wrapper">
<h3 class="post-title">{{ content.name }}</h3>
<a class="post-link" href="{{ content.absolute_url }}">Read Story <svg class="post-link-chevron" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512"><path d="M17.525 36.465l-7.071 7.07c-4.686 4.686-4.686 12.284 0 16.971L205.947 256 10.454 451.494c-4.686 4.686-4.686 12.284 0 16.971l7.071 7.07c4.686 4.686 12.284 4.686 16.97 0l211.051-211.05c4.686-4.686 4.686-12.284 0-16.971L34.495 36.465c-4.686-4.687-12.284-4.687-16.97 0z"/></svg></a>
</div>
</li>
{% endfor %}
</ul>
I’m an experienced developer, but new to HubSpot. I have gotten a lot of help from the support people, but this one they asked me ask over here.