Only for non-empty collections.
This commit is contained in:
parent
b63f9077ae
commit
8bffa6fce7
1 changed files with 2 additions and 0 deletions
|
@ -12,6 +12,7 @@ templateClass: tmpl-post
|
|||
|
||||
{{ content | safe }}
|
||||
|
||||
{%- if collections.posts %}
|
||||
{%- set nextPost = collections.posts | getNextCollectionItem(page) %}
|
||||
{%- set previousPost = collections.posts | getPreviousCollectionItem(page) %}
|
||||
{%- if nextPost or previousPost %}
|
||||
|
@ -21,3 +22,4 @@ templateClass: tmpl-post
|
|||
{%- if previousPost %}<li>Previous: <a href="{{ previousPost.url | url }}">{{ previousPost.data.title }}</a></li>{% endif %}
|
||||
</ul>
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
|
|
Loading…
Add table
Reference in a new issue