public function index()
{
$categories = $this->Categories_model->getCategory($this->input->get('category_id'));
if (!$categories and $this->input->get('category_id')) {
show_404();
}
$filter = array();
$this->template->setTitle($this->lang->line('text_heading'));
$this->template->setBreadcrumb('<i class="fa fa-home"></i>', '/');
$this->template->setBreadcrumb($this->lang->line('text_heading'), 'menus');
$this->template->setScriptTag('js/jquery.mixitup.js', 'jquery-mixitup-css', '100330');
if ($this->input->get('page')) {
$filter['page'] = (int) $this->input->get('page');
} else {
$filter['page'] = '';
}
if ($this->config->item('menus_page_limit')) {
$filter['limit'] = $this->config->item('menus_page_limit');
}
$filter['sort_by'] = 'menus.menu_priority';
$filter['order_by'] = 'ASC';
$filter['filter_status'] = '1';
$filter['filter_category'] = $data['category_id'] = (int) $this->input->get('category_id');
// retrieve 3rd uri segment else set FALSE if unavailable.
$data['menu_list'] = $this->getList($filter);
$data['menu_total'] = $this->Menus_model->getCount();
if (is_numeric($data['menu_total']) and $data['menu_total'] < 150) {
$filter['category_id'] = 0;
}
$this->load->module('local');
$data['location_name'] = $this->location->getName();
$data['local_info'] = $this->local->info();
$data['local_reviews'] = $this->local->reviews();
$data['local_gallery'] = $this->local->gallery();
$this->template->render('local', $data);
}