Only for non-empty collections.
This commit is contained in:
parent
b63f9077ae
commit
8bffa6fce7
@ -12,6 +12,7 @@ templateClass: tmpl-post
|
|||||||
|
|
||||||
{{ content | safe }}
|
{{ content | safe }}
|
||||||
|
|
||||||
|
{%- if collections.posts %}
|
||||||
{%- set nextPost = collections.posts | getNextCollectionItem(page) %}
|
{%- set nextPost = collections.posts | getNextCollectionItem(page) %}
|
||||||
{%- set previousPost = collections.posts | getPreviousCollectionItem(page) %}
|
{%- set previousPost = collections.posts | getPreviousCollectionItem(page) %}
|
||||||
{%- if nextPost or previousPost %}
|
{%- 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 %}
|
{%- if previousPost %}<li>Previous: <a href="{{ previousPost.url | url }}">{{ previousPost.data.title }}</a></li>{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
{%- endif %}
|
||||||
|
Loading…
Reference in New Issue
Block a user