Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
In the controller common/header.php add the formation of the class name:
if (isset($this->request->get['route'])) {
if (isset($this->request->get['product_id'])) {
$class = '-' . $this->request->get['product_id'];
} elseif (isset($this->request->get['path'])) {
$class = '-' . $this->request->get['path'];
} elseif (isset($this->request->get['manufacturer_id'])) {
$class = '-' . $this->request->get['manufacturer_id'];
} elseif (isset($this->request->get['information_id'])) {
$class = '-' . $this->request->get['information_id'];
} else {
$class = '';
}
$data['class'] = str_replace('/', '-', $this->request->get['route']) . $class;
} else {
$data['class'] = 'common-home';
}
<body{% if class %} class="{{ class }}"{% endif %}>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question