Browse Source

move link generation into the loop

pull/7813/head
Tobias Diekershoff 2 years ago
parent
commit
b7ecc62cc8
  1. 11
      src/Content/Item.php

11
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,

Loading…
Cancel
Save