Skip to content
Snippets Groups Projects
Commit d2bff20d authored by alexisben's avatar alexisben
Browse files

add option to handle related posts quantity

parent 4051bac7
No related branches found
No related tags found
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