Created
October 3, 2024 10:38
-
-
Save apsolut/930d99691dcf5c21736304c896e43889 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="post-listing"> | |
{% set post_ids = [] %} | |
{% for post_item in module.posts %} | |
{% do post_ids.append(post_item.post_id) %} | |
{% endfor %} | |
{% if post_ids %} | |
<div class="post-listing"> | |
{% for post_id in post_ids %} | |
{% set pageContents = content_by_ids([post_id]) %} | |
{% for content in pageContents %} | |
<div class="post-item"> | |
<a href="{{ content.absolute_url }}"> | |
{% if content.featured_image %} | |
<div class="post-image"> | |
<div class="post-image-inside"> | |
{% set featuredImage = content.post_list_summary_featured_image %} | |
{% set featuredImageURL = resize_image_url(featuredImage, 0, 0, 370, true, true) %} | |
<img src="{{ featuredImageURL }}" alt="{{ content.title }}" class="img-responsive" /> | |
</div> | |
</div> | |
{% else %} | |
<div class="post-image" style="background-color: #f2f6f7;"></div> | |
{% endif %} | |
<h3 class="post-title"> | |
{{ content.name }} | |
</h3> | |
</a> | |
</div> | |
{% endfor %} | |
{% endfor %} | |
</div> | |
{% endif %} | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment