From 0a4dce082fb503c5e1b8218a949238b6669e1db6 Mon Sep 17 00:00:00 2001 From: Catalin Date: Fri, 10 Mar 2023 21:24:32 +0100 Subject: [PATCH] Putting date when editing news Fuzzy date when editing the news in the database, with several options. --- src/private/templates/index.latte | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/private/templates/index.latte b/src/private/templates/index.latte index fbef18c..0cbeb4d 100644 --- a/src/private/templates/index.latte +++ b/src/private/templates/index.latte @@ -35,6 +35,13 @@

{$news["description"]|noescape}

+ {if empty(!$news["edited"])} +

Edited: {strtotime($news["edited"])|fuzzyDateAbbr}

+ {/if} + {* or you can use with translation and a CSS class for example, creating your css obviously *} + {*

{_"NEW_EDITED"}{strtotime($news["edited"])|fuzzyDateAbbr}

*} + {* option without fuzzyDate *} + {*

{_"NEW_EDITED"}{strtotime($news["edited"])|date:'d/m/Y - H:i'}

*}
{/foreach}