menu fixes

This commit is contained in:
Arsen Mirzaev Tatyano-Muradovich 2025-01-15 09:18:58 +03:00
parent 3b32fc10b5
commit 58da87bb0e
6 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,18 @@
{
"urn": "/cart",
"name": {
"en": "Cart",
"ru": "Корзина"
},
"style": {
"order": 1
},
"class": {},
"icon": {
"style": {},
"class": "shopping cart"
},
"image": {
"storage": null
}
}

View File

@ -0,0 +1,20 @@
{
"urn": "/",
"name": {
"en": "Main page",
"ru": "Главная страница"
},
"style": {
"order": 0
},
"class": {},
"icon": {
"style": {
"rotate": "-135deg"
},
"class": "arrow circle"
},
"image": {
"storage": null
}
}

View File

@ -74,6 +74,9 @@ final class cart extends core
parameters: ['language' => $this->language->name],
errors: $this->errors['menu']
);
// Universalizing
if ($this->view->menu instanceof _document) $this->view->menu = [$this->view->menu];
}
// Initializing the cart

View File

@ -293,6 +293,9 @@ final class catalog extends core
parameters: ['language' => $this->language->name],
errors: $this->errors['menu']
);
// Universalizing
if ($this->view->menu instanceof _document) $this->view->menu = [$this->view->menu];
}
if (str_contains($this->request->headers['accept'], content::json->value)) {

View File

@ -56,6 +56,9 @@ final class index extends core
parameters: ['language' => $this->language->name],
errors: $this->errors['menu']
);
// Universalizing
if ($this->view->menu instanceof _document) $this->view->menu = [$this->view->menu];
}
if (str_contains($this->request->headers['accept'], content::any->value)) {

View File

@ -74,6 +74,9 @@ final class cart extends core
parameters: ['language' => $this->language->name],
errors: $this->errors['menu']
);
// Universalizing
if ($this->view->menu instanceof _document) $this->view->menu = [$this->view->menu];
}
// Initializing the cart