Переход со 2 страницы не получается, переходит со 2 на 2 , ( то есть обратно не переходит ) модуль Новости news155
Код: <?php // News Module for Opencart v1.5.5, modified by villagedefrance ([email protected]) ?> <?php if ($news) { ?> <?php if($box) { ?> <div class="box"> <div class="box-heading"> <?php if($icon) { ?> <div style="float: left; margin-right: 8px;"><img src="catalog/view/theme/default/image/message.png" alt="" /></div> <?php } ?> <?php if($customtitle) { ?> <?php echo $customtitle; ?> <?php } ?> </div> <div class="box-content"> <?php foreach ($news as $news_story) { ?> <div class="box-news"> <?php if ($show_headline) { ?> <h4><?php echo $news_story['title']; ?></h4> <?php } ?> <p> <a class="newsa" href="<?php echo $news_story['href']; ?>"> <img style="margin-bottom: 1px; vertical-align: middle;" src="catalog/view/theme/default/image/message-news.png" alt="" /> </a> <span><?php echo $news_story['posted']; ?></span> </p> <p><a class="newsimage" href="<?php echo $news_story['href']; ?>"><?php if ($news_story['thumb']) { ?><img src="<?php echo $news_story['thumb']; ?>"><?php } ?></a><?php echo $news_story['description']; ?> .. </p> <p><a class="button" href="<?php echo $news_story['href']; ?>"> <?php echo $text_more; ?></a></p> </div> <?php } ?> <?php if($showbutton) { ?> <div style="text-align:right;"> <a href="<?php echo $newslist; ?>" class="button"><span><?php echo $buttonlist; ?></span></a> </div> <?php } ?> </div> </div> <?php } else { ?> <div style="margin-bottom:10px;"> <?php foreach ($news as $news_story) { ?> <div class="box-news"> <img src="<?php echo $news_story['thumb']; ?>"> <?php if ($show_headline) { ?> <h4><?php echo $news_story['title']; ?></h4> <?php } ?> <?php echo $news_story['description']; ?> .. <br /> <a href="<?php echo $news_story['href']; ?>"> <?php echo $text_more; ?></a> </p> <a class="newsa" href="<?php echo $news_story['href']; ?>"><img src="catalog/view/theme/default/image/message-news.png" alt="" /></a> <span><b><?php echo $text_posted; ?></b> <?php echo $news_story['posted']; ?></span> </div> <?php } ?> <?php if($showbutton) { ?> <div style="text-align:right;"> <a href="<?php echo $newslist; ?>" class="button"><span><?php echo $buttonlist; ?></span></a> </div> <?php } ?> </div> <?php } ?> <?php } ?> --- Добавлено, 6 авг 2014 --- Это контроллер Код: <?php class ControllerModuleNews extends Controller { private $_name = 'news'; protected function index($setting) { static $module = 0; $this->language->load('module/' . $this->_name); $this->data['heading_title'] = $this->language->get('heading_title'); $this->load->model('localisation/language'); $languages = $this->model_localisation_language->getLanguages(); $this->data['customtitle'] = $this->config->get($this->_name . '_customtitle' . $this->config->get('config_language_id')); $this->data['header'] = $this->config->get($this->_name . '_header'); if (!$this->data['customtitle']) { $this->data['customtitle'] = $this->data['heading_title']; } if (!$this->data['header']) { $this->data['customtitle'] = ''; } $this->data['icon'] = $this->config->get($this->_name . '_icon'); $this->data['box'] = $this->config->get($this->_name . '_box'); $this->document->addStyle('catalog/view/theme/default/stylesheet/news.css'); $this->load->model('catalog/news'); $this->data['text_more'] = $this->language->get('text_more'); $this->data['text_posted'] = $this->language->get('text_posted'); $this->data['show_headline'] = $this->config->get($this->_name . '_headline_module'); $this->data['news_count'] = $this->model_catalog_news->getTotalNews(); $this->data['news_limit'] = $setting['limit']; if ($this->data['news_count'] > $this->data['news_limit']) { $this->data['showbutton'] = true; } else { $this->data['showbutton'] = false; } $this->data['buttonlist'] = $this->language->get('buttonlist'); $this->data['newslist'] = $this->url->link('information/news'); $this->data['numchars'] = $setting['numchars']; if (isset($this->data['numchars'])) { $chars = $this->data['numchars']; } else { $chars = 100; } $this->data['news'] = array(); $results = $this->model_catalog_news->getNewsShorts($setting['limit']); $this->load->model('tool/image'); foreach ($results as $result) { if ($result['image']) { $image = $this->model_tool_image->resize($result['image'], 150, 150); } else { $image = FALSE; } $this->data['news'][] = array( 'title' => $result['title'], 'description' => utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, $chars), 'href' => $this->url->link('information/news', 'news_id=' . $result['news_id']), 'thumb' => $image, 'posted' => date($this->language->get('date_format_short'), strtotime($result['date_added'])) ); } $this->data['module'] = $module++; if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/' . $this->_name . '.tpl')) { $this->template = $this->config->get('config_template') . '/template/module/' . $this->_name . '.tpl'; } else { $this->template = 'default/template/module/' . $this->_name . '.tpl'; } $this->render(); } } ?>