I was going through my code for testing purposes and found out, that When entry's first time created, it also outputs data from the field "dateUpdated". I'm assuming, when an entry is first time created it is also first time updated.
So I'm trying to write a conditional statement to not output "dateUpdated" for entries, that were first time created.
So far I didn't come up with anything, because I'm not sure If what I'm assuming is true.
For the start.
{# Date #}
<span>
{{ "published"|t|ucwords }}: {{ entry.dateCreated is empty ? "" : entry.dateCreated|date("d.m.Y") }},
</span>
{% if entry.dateUpdated %}
<span class="uk-text-success-alert">
{{ "updated"|t|ucwords }}: {{ entry.dateUpdated is empty ? "" : entry.dateUpdated|date("d.m.Y") }},
</span>
{% endif %}
{% if entry.expiryDate %}
<span class="uk-text-danger">
{{ "expire"|t|ucwords }}: {{ entry.expiryDate is empty ? "" : entry.expiryDate|date("d.m.Y") }},
</span>
{% endif %}
dateCreatedanddateUpdatedare entered at the same time. So, instead of checking for a value, could you check ifdateUpdatedis afterdateCreated? – Damon Apr 20 '15 at 14:24datedUpdateddate is after thedateCreatedthen that should work I think... – Damon Apr 20 '15 at 14:44dateCreatedand in conditiondateUpdatedandexpiryDatefor entry. So I have to write some conditional statement, where I compare times. It must to be easy, just hard to start. – Dominik Krulak Apr 20 '15 at 14:51