Skip to content

Commit

Permalink
Fix модуля Information
Browse files Browse the repository at this point in the history
Fix Если у статьи порядок сортировки -1, то она не должна отображаться
  • Loading branch information
ravilrrr committed Feb 10, 2014
1 parent efb0141 commit 69dd58a
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions catalog/controller/module/information.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ protected function index() {
$this->data['informations'] = array();

foreach ($this->model_catalog_information->getInformations() as $result) {
$this->data['informations'][] = array(
'title' => $result['title'],
'href' => $this->url->link('information/information', 'information_id=' . $result['information_id'])
);
}
if ($result['sort_order'] != '-1') {
$this->data['informations'][] = array(
'title' => $result['title'],
'href' => $this->url->link('information/information', 'information_id=' . $result['information_id'])
);
}
}

$this->data['contact'] = $this->url->link('information/contact');
$this->data['sitemap'] = $this->url->link('information/sitemap');
Expand All @@ -31,4 +33,4 @@ protected function index() {
$this->render();
}
}
?>
?>

2 comments on commit 69dd58a

@toporchillo
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Эта проверка есть в футере, в верхнем меню?

@ravilrrr
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

футер не трогал, т.к там идет проверка по умолчанию на установленный чекбокс "Показывать в футере." В итоге получаем удобства, хочешь скрыть в модуле Информация, то ставим -1, хотим скрыть в футере, то снимаем чекбокс.
А верхнем меню статьи же не выводятся, поэтому и проверок никаких не надо.

Please sign in to comment.