Hey, folks!
I’m very new to the HubL world, so please forgive me if this is a very simple fix! I’m trying to create two containers to house our most recent blogs. One will be full-width and host the most recent blog, while the following will be three columns and host the previous 3 blogs. I’m having trouble creating an HTML + HubL function to ensure the most recent blog will be excluded from the three-column container. Can someone please help if they know how to fix this?
Here’s the code I’m currently using:
<div class=“listing-full-wrap”>
<div class=“content-wrapper”>
<div class=“row”>
<section class=“blog-index-wrap”>
{% set rec_posts = blog_recent_posts(module.select_blog, 1) %}
{% for rec_post in rec_posts %}
<div class=“post-items”>
{% if rec_post.featured_image %}
<div class=“summary-thumbnail-outer-container”>
<a href=“{{ rec_post.absolute_url }}” class=“gallery-image-container”>
<div class=“summary-thumbnail img-wrapper”>
<img src=“{{ rec_post.featured_image }}” alt=“{{ rec_post.name }}”>
</div>
</a>
</div>
{% endif %}
<div class=“summary-content gallery-meta-container”>
<div class=“summary-title”>
<a href=“{{ rec_post.absolute_url }}” class=“summary-title-link”>{{ rec_post.name }}</a>
</div>
<div class=“summary-excerpt summary-excerpt-only”>
<p>
{{ rec_post.post_list_content|truncatehtml(300)|striptags|safe }}
</p>
</div>
<div class=“container–below-content”>
<div class=“summary-metadata–primary”>
<time class=“summary-metadata-item summary-metadata-item–date”>{{ rec_post.publish_date_local_time.strftime(‘%b %d, %Y’) }}</time>
</div>
</div>
</div>
</div>
{% endfor %}
</section>
</div>
</div>
</div>
<div class=“listing-columns-wrap”>
<div class=“content-wrapper”>
<div class=“row”>
<section class=“blog-index-wrap”>
{% set rec_posts = blog_recent_posts(module.select_blog, 3) %}
{% for rec_post in rec_posts %}
<div class=“post-items”>
{% if rec_post.featured_image %}
<div class=“summary-thumbnail-outer-container”>
<a href=“{{ rec_post.absolute_url }}” class=“gallery-image-container”>
<div class=“summary-thumbnail img-wrapper”>
<img src=“{{ rec_post.featured_image }}” alt=“{{ rec_post.name }}”>
</div>
</a>
</div>
{% endif %}
<div class=“summary-content gallery-meta-container”>
<div class=“summary-title”>
<a href=“{{ rec_post.absolute_url }}” class=“summary-title-link”>{{ rec_post.name }}</a>
</div>
<div class=“summary-excerpt summary-excerpt-only”>
<p>
{{ rec_post.post_list_content|truncatehtml(300)|striptags|safe }}
</p>
</div>
<div class=“container–below-content”>
<div class=“summary-metadata–primary”>
<time class=“summary-metadata-item summary-metadata-item–date”>{{ rec_post.publish_date_local_time.strftime(‘%b %d, %Y’) }}</time>
</div>
</div>
</div>
</div>
{% endfor %}
</section>
</div>
</div>
</div>