Skip to content
This repository has been archived by the owner on Aug 13, 2021. It is now read-only.

Commit

Permalink
Merge pull request #2 from MelvinAchterhuis/feature/translated-custom…
Browse files Browse the repository at this point in the history
…-fields

Retrieve translated custom fields
  • Loading branch information
runelaenen authored Mar 22, 2021
2 parents c4ca283 + 305d72d commit 90943fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Subscriber/NavigationLoadedSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ private function handleTree(array $tree)
/** @var TreeItem $treeItem */
foreach ($tree as $treeItem) {
$category = $treeItem->getCategory();
$customFields = $category->getCustomFields() ?? [];
$customFields = $category->getTranslated()['customFields'] ?? [];
if (array_key_exists('rl_cl_isCategoryLink', $customFields) && $customFields['rl_cl_isCategoryLink'] === '1') {
$categoryId = $customFields['rl_cl_categoryId'];
$url = $this->handler->generate('frontend.navigation.page', ['navigationId' => $categoryId]);
Expand Down

0 comments on commit 90943fe

Please sign in to comment.