From b7ecc62cc8e24b300ce7ab136b69424dc3cf7e95 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 3 Nov 2019 19:57:32 +0100 Subject: [PATCH] move link generation into the loop --- src/Content/Item.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Content/Item.php b/src/Content/Item.php index f086fbe19c..ea1baef180 100644 --- a/src/Content/Item.php +++ b/src/Content/Item.php @@ -42,13 +42,12 @@ final class Item $folders = []; $first = true; - if (!empty($item['author-link'])) { - $url = $item['author-link'] . "?category=" . rawurlencode($savedFolderName); - } else { - $url = '#'; - } - foreach (FileTag::fileToArray($item['file'] ?? '', 'category') as $savedFolderName) { + if (!empty($item['author-link'])) { + $url = $item['author-link'] . "?category=" . rawurlencode($savedFolderName); + } else { + $url = '#'; + } $categories[] = [ 'name' => $savedFolderName, 'url' => $url,