public function displayList() { $id_lang = $this->context->language->id; $id_shop = $this->context->shop->id; MyFriends::displaySlide(); $limit_per_page = intval($this->conf['list_limit_page']); $current_page = isset($_GET['p']) && is_numeric($_GET['p']) ? intval($_GET['p']) : 1; $start = ($current_page - 1) * $limit_per_page; $list = FriendsInfo::getFriends(); $listFriends = array(); if (isset($list) && is_array($list) && count($list)) { /** pagination * */ // $nb_pages = ceil($nb_articles / $limit_per_page); // $next = $current_page > 1 ? true : false; //articles plus recents // $back = $current_page >= 1 && ($current_page < $nb_pages) ? true : false; //articles precedents $i = 0; foreach ($list as $cat) { $media = FriendsImage::getImageByFriend($cat['id_friend']); $cat['media'] = $media; $listFriends[] = $cat; } // echo '<pre>'; // print_r($listCategories); // echo '</pre>'; $this->context->smarty->assign(array('list_friends' => $listFriends, 'img_friend_dir' => _THEME_FRIEND_DIR_)); } $this->setTemplate('list.tpl'); }