<h2> <font style="color: #5D5D5D;"> {h_header} </font> <span class="small">{s_header}</span></h2> <hr/> <div class="row"> <div class="col-sm-12 col-lg-12 col-md-12"> <?php $limitValue = Constant::getLimitValue(); $maxPage = ceil($countProduct / $limitValue) - 1; if ($countProduct > $limitValue) { ?> <ul class="pagination pagination-right"> <li<?php echo $page == 0 ? ' class="disabled" ' : ""; ?> > <a href="<?php echo base_url("index/index/{$categoryId}/0"); ?> " aria-label="Previous"> <span aria-hidden="true">«</span> </a> </li> <li<?php echo $page == 0 ? ' class="disabled" ' : ""; ?> > <a href="<?php echo base_url("index/index/{$categoryId}/" . ($page - 1));
function getProductByCategoryId($categoryId, $lang, $productId = null, $page = 0) { $limitValue = Constant::getLimitValue(); return $this->dbProductByCategoryId($categoryId, $lang, $productId)->limit($limitValue, $limitValue * $page)->get()->result_array(); }