CMS Development

dbarbara
Contributor

Reference for coding a custom blog post template

Hi,

 

Am looking for some documentation/references/examples for creating a custom blog post template to display a single post. 

 

I have one built, and it displays in preview, but the module disappears on a live page.

 

Thanks.

<div class="featured-content">

<div class="span6">
{% set topic_posts = blog_recent_topic_posts('{{ content.parent_blog.id }}', 'cloud-101', 1 ) %}
{% for topic_post in topic_posts %}

{% if topic_post.post_list_summary_featured_image %}
<span>
<img src="{{ topic_post.post_list_summary_featured_image }}" class="hs-featured-image featured-post-image-1">
</span>
{% endif %}

</div>

<div class="span6">
<div class="featured">
<span>
{% if topic_post.topic_list %}
<div id="hubspot-topic_data" class="list-topics"><h4>
{% for topic in topic_post.topic_list %}
<span class="topic-link">{{ topic.name }}</span>
{% endfor %}
</h4></div>
{% endif %}

<h3>{{ topic_post.name }}</h3>

{{ topic_post.post_list_content|truncatehtml(250, "...", false) }}

<a class="more-link-featured" href="{{topic_post.absolute_url}}">Read More</a>
</span>
</div>
</div>

{% endfor %}
</div>

 

0 Upvotes
1 Reply 1
Anonymous
Not applicable

Reference for coding a custom blog post template

Hey @dbarbara do you have a live link or even preview screenshot? You might also find this resource helpful: https://designers.hubspot.com/docs

0 Upvotes