Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
brendt committed Mar 17, 2021
1 parent 0340bbc commit 9dc2d58
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Stitcher/Page/Adapter/CollectionAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,15 @@ protected function getEntries($pageConfiguration): ?array
{
$variable = $pageConfiguration['variables'][$this->variable] ?? null;

return Yaml::parse(File::read($variable));
$entries = Yaml::parse(File::read($variable));

foreach ($entries as $id => $data) {
$data['id'] = $data['id'] ?? $id;

$entries[$id] = $data;
}

return $entries;
}

protected function createEntryConfiguration(array $pageConfiguration, $entryId, $entry): array
Expand Down

0 comments on commit 9dc2d58

Please sign in to comment.