<h1 id="title-page"><?php echo $heading_title; ?></h1>
каким образом можно вставить его в хедер без добавления этой функции в header.php?
if (isset($this->request->get['path'])) {
$url = '';
if (isset($this->request->get['sort'])) {
$url .= '&sort=' . $this->request->get['sort'];
}
if (isset($this->request->get['order'])) {
$url .= '&order=' . $this->request->get['order'];
}
if (isset($this->request->get['limit'])) {
$url .= '&limit=' . $this->request->get['limit'];
}
$path = '';
$parts = explode('_', (string)$this->request->get['path']);
$category_id = (int)array_pop($parts);
foreach ($parts as $path_id) {
if (!$path) {
$path = (int)$path_id;
} else {
$path .= '_' . (int)$path_id;
}
$category_info = $this->model_catalog_category->getCategory($path_id);
if ($category_info) {
$data['breadcrumbs'][] = array(
'text' => $category_info['name'],
'href' => $this->url->link('product/category', 'path=' . $path . $url)
);
}
}
} else {
$category_id = 0;
}
$category_info = $this->model_catalog_category->getCategory($category_id);
if ($category_info) {
if ($category_info['meta_h1']) {
$data['heading_title'] = $category_info['meta_h1'];
} else {
$data['heading_title'] = $category_info['name'];
}
}