Skip to content
Snippets Groups Projects
Unverified Commit c392313a authored by Alexis BENOIT's avatar Alexis BENOIT Committed by GitHub
Browse files

Merge pull request #88 from noesya/feature/programs-related-posts-quantity-option

add option to handle related posts quantity
parents 4051bac7 d2bff20d
No related branches found
Tags v3.1.5
No related merge requests found
......@@ -18,6 +18,9 @@ params:
persons:
index:
layout: list # grid | list
programs:
related_posts:
quantity: 4
home:
toc:
disabled: true
......
......@@ -7,9 +7,14 @@
{{ $category_name := safeHTML .Title | truncate 30 }}
{{ i18n "posts.see_all_in_program" (dict "Title" $category_name) }}
</a>
<div class="blocks">
{{ partial "posts/block-posts-layout.html" (dict "posts" .Pages ) }}
</div>
{{/* Related posts */}}
{{ $posts := first site.Params.programs.related_posts.quantity .Pages }}
{{ if gt (len $posts) 0 }}
<div class="blocks">
{{ partial "posts/block-posts-layout.html" (dict "posts" $posts ) }}
</div>
{{ end }}
</div>
</div>
</section>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment