* @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Language\Text; use Joomla\CMS\Layout\LayoutHelper; use Joomla\Registry\Registry; $list = $displayData['list']; $pages = $list['pages']; $total = $list['total']; $options = new Registry($displayData['options']); $showLimitBox = $options->get('showLimitBox', false); $showPagesLinks = $options->get('showPagesLinks', true); $showLimitStart = $options->get('showLimitStart', true); $showItemPosition = $options->get('showItemPosition', true); // Calculate to display range of pages $currentPage = 1; $range = 1; $step = 5; if (!empty($pages['pages'])) { foreach ($pages['pages'] as $k => $page) { if (!$page['active']) { $currentPage = $k; } } } if ($currentPage >= $step) { if ($currentPage % $step === 0) { $range = ceil($currentPage / $step) + 1; } else { $range = ceil($currentPage / $step); } } $first = ($currentPage - 1) * $list['limit'] + 1; $last = $first + $list['limit'] - 1; $last = $last > $total ? $total : $last; ?>