Доброго времени суток!
Хочу создать свою страницу страницу наподобие уже имеющейся - Информация 1) создал контроллер controller/information/table-size.php
<?php
class ControllerInformationTableSize extends Controller {
private $error = array();
public function index() {
$this->load->language('information/table-size');
$this->document->setTitle($this->language->get('heading_title'));
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/home')
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('information/table-size')
);
$data['heading_title'] = $this->language->get('heading_title');
$data['column_left'] = $this->load->controller('common/column_left');
$data['column_right'] = $this->load->controller('common/column_right');
$data['content_top'] = $this->load->controller('common/content_top');
$data['content_bottom'] = $this->load->controller('common/content_bottom');
$data['footer'] = $this->load->controller('common/footer');
$data['header'] = $this->load->controller('common/header');
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/information/table-size.tpl')) {
$this->response->setOutput($this->load->view($this->config->get('config_template') . '/template/information/table-size.tpl', $data));
} else {
$this->response->setOutput($this->load->view('default/template/information/table-size.tpl', $data));
}
}
}
2) создал шаблон template/information/table-size.tpl
<?php echo $header; ?>
<div class="container">
<ul class="breadcrumb">
<?php $breadlast = array_pop($breadcrumbs); foreach ($breadcrumbs as $breadcrumb) { ?>
<li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
<?php } ?>
<li><?php echo $breadlast['text']; ?></li>
</ul>
<div id="content"></div>
</div>
<?php echo $footer; ?>
3) в контроллере catalog/controller/common/footer.php создал переменную
$data['table_size'] = $this->url->link('information/table-size');
4) вывел в шаблон
<a class="btn" href="<?php echo $table_size; ?>">123</a>
В итоге ссылка пустая а логи ругаются на неопределенную переменную в футереUndefined variable: table_size in /catalog/view/theme/james/template/common/footer.tpl on line 41