$this->document->addLink($this->url->link('product/category', 'path=' . $category_info['category_id'] . '&page='. $page), 'canonical');
$this->document->addLink($this->url->link('product/category', 'path=' . $category_info['category_id']), 'canonical');
private $myTag = array();
public function addMyTag($var) {
$this->myTag[] = $var;
}
public function getMyTag() {
return $this->myTag;
}
$data['myTag'] = $this->document->getMyTag();
{% for tag in myTag %}
{{ 'любой ваш html код или переменная '~tag }}
{% endfor %}
$this->document->addMyTag($var);
$mail->setFrom($this->config->get('config_email'));
$mail->setFrom('shop@mail.com');
$data['heading_title'] = $category_info['name'];
if ($page < 1) {
$this->response->redirect($this->url->link('product/category', 'path=' . $category_info['category_id']));
}
{% if categories %}
{% if categories|length <= 5 %}
<div class="row">
<div class="col-sm-3">
<ul>
{% for category in categories %}
<li><a href="{{ category.href }}">{{ category.name }}</a></li>
{% endfor %}
</ul>
</div>
{% else %}
<div class="col-sm-3">{% for category in categories|batch((categories|length / 1)|round(1, 'ceil')) %}
<ul>
{% for child in category %}
<li><a href="{{ child.href }}">{{ child.name }}</a></li>
{% endfor %}
</ul>
</div>
{% endfor %}</div>
<br />
{% endif %}
{% endif %}
{% if not categories and not products %}
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 %}>
'href' => $this->url->link('catalog/category', 'user_token=' . $this->session->data['user_token'] . '/bla-bla-bla', true),
'href' => $this->url->link('catalog/category', 'user_token=' . $this->session->data['user_token'] . '&foo=bar', true),