Skip to content

Commit

Permalink
Update Create.php
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudLigny committed Dec 1, 2023
1 parent cbe303d commit edc57e7
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/Step/Menus/Create.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,6 @@ public function process(): void
if ($menusConfig = (array) $this->config->get('menus', $language['code'], false)) {
$totalConfig = array_sum(array_map('count', $menusConfig));
$countConfig = 0;
$page404 = '404.html';

if ($language['code'] !== $this->config->getLanguageDefault()) {
$page404 = $language['code'] . '/404.html';
}

foreach ($menusConfig as $menuConfig => $entry) {
// add Menu if not exists
Expand Down Expand Up @@ -112,7 +107,7 @@ public function process(): void
if ($enabled) {
$item = (new Entry($properties['id']))
->setName($properties['name'] ?? ucfirst($properties['id']))
->setUrl((new \Cecil\Assets\Url($this->builder, $properties['url'] ?? $page404))->getUrl())
->setUrl((new \Cecil\Assets\Url($this->builder, $properties['url'] ?? '404', ['language' => $language['code']]))->getUrl())
->setWeight((int) ($properties['weight'] ?? 0));
$menu->add($item);

Expand Down

0 comments on commit edc57e7

Please sign in to comment.