Don't show old post message if there's no date
This commit is contained in:
parent
f39e685395
commit
8f144754bc
|
@ -1,6 +1,9 @@
|
||||||
{% macro shouldDisplayOldPostMessage(post) %}
|
{% macro shouldDisplayOldPostMessage(post) %}
|
||||||
{% set cutOffDate = 'today -1 year'|date('U') %}
|
{% set cutOffDate = 'today -1 year'|date('U') %}
|
||||||
{{ post.date <= cutOffDate }}
|
|
||||||
|
{% if post.date is not empty %}
|
||||||
|
{{ post.date <= cutOffDate }}
|
||||||
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% import _self as helpers %}
|
{% import _self as helpers %}
|
||||||
|
|
Loading…
Reference in a new issue