From 24afe3a03a3bef4eada554cfc574d80ea7b53d02 Mon Sep 17 00:00:00 2001 From: buttle Date: Thu, 28 Apr 2022 18:54:54 +0200 Subject: [PATCH] fixes show only year in collections index --- view/common/block-layout/list-of-sites.phtml | 3 +++ view/common/site-list-entry.phtml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/view/common/block-layout/list-of-sites.phtml b/view/common/block-layout/list-of-sites.phtml index 1b237b3..f16e61d 100644 --- a/view/common/block-layout/list-of-sites.phtml +++ b/view/common/block-layout/list-of-sites.phtml @@ -19,6 +19,9 @@ foreach($sites as $site){ if (!isset($site_data['currator'])) { $site_data['currator'] = ""; } + if (isset($site_data['project_date'])) { + $site_data['project_date'] = substr($site_data['project_date'], 0, 4); + } array_push($projects, $site_data); } //$collections = json_encode($collections, JSON_UNESCAPED_SLASHES); diff --git a/view/common/site-list-entry.phtml b/view/common/site-list-entry.phtml index 12cdc0f..a8436b6 100644 --- a/view/common/site-list-entry.phtml +++ b/view/common/site-list-entry.phtml @@ -22,7 +22,7 @@ $summary = $showSummary ? $site->summary() : null;
  • - +