?
avatar gocha-gochitashvili
gocha-gochitashvili
11 Mar 2017

Steps to reproduce the issue

  1. Install fresh joomla 3.6.5
  2. Go to admin and create 10 sample category (cat1, cat2, cat3)
  3. Go to menu manager and create List All Categories menu
  4. Shared tab > set pagination to show

Expected result

Must show pagination on live site eg after 5 category

Actual result

Pagination not working

System information (as much as possible)

Joomla 3.6.5 stable
PHP 7.0.10

Additional comments

I see in categoryes model or in categoryes controller no pagination code implemented, or in view there is no any pagination code.

avatar gocha-gochitashvili gocha-gochitashvili - open - 11 Mar 2017
avatar joomla-cms-bot joomla-cms-bot - change - 11 Mar 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 11 Mar 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 11 Mar 2017

known Issue #14393

avatar gocha-gochitashvili gocha-gochitashvili - change - 11 Mar 2017
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-03-11 06:47:19
Closed_By gocha-gochitashvili
avatar gocha-gochitashvili gocha-gochitashvili - close - 11 Mar 2017
avatar huynhkhanhduc
huynhkhanhduc - comment - 18 May 2017

I fixed by using: new JPagination();
Here are what I did:
`<?php
/**

  • @Package Joomla.Site
  • @subpackage com_content
  • @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
  • @license GNU General Public License version 2 or later; see LICENSE.txt
    */
    defined('_JEXEC') or die;

JHtml::_('bootstrap.tooltip');

$lang = JFactory::getLanguage();
$limit = 10;
if (count($this->items[$this->parent->id]) > 0 && $this->maxLevelcat != 0) :
$start = 0;
if(isset($_GET['start'])&&$_GET['start']){
$start = $_GET['start'];
}
foreach($this->items[$this->parent->id] as $id => $item) : ?>
<?php
if($start == 0){

	if($id >= $numberItem){
		continue;
	}
}else{
	if($id < ($start)|| $id >= ($start+$limit)){
		continue;
	}
}


// HTML FOR EACH ITEM HERE  

endforeach;

$pagination = new JPagination(count($this->items[$this->parent->id]), $start, $limit);
echo $pagination->getPagesLinks();
endif;

?>
`

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 18 May 2017

@huynhkhanhduc can you make a PR for this Issue?

avatar huynhkhanhduc
huynhkhanhduc - comment - 18 May 2017

This was just a hard fixed.
Here are the steps:

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 18 May 2017

@huynhkhanhduc this is a closed Issue, please write on at #14393

avatar huynhkhanhduc
huynhkhanhduc - comment - 18 May 2017

Ok, Got it

avatar huynhkhanhduc
huynhkhanhduc - comment - 18 May 2017

@franz-wohlkoenig you can see my comment here: #14393

Add a Comment

Login with GitHub to post a comment