Pagination Bootstrap 4
- :
pagination.php
Cet article vous a plu ?
(0)
Screenshot
Markup
<?php
/**
* @package Joomla.Platform
* @subpackage HTML
* @Author web-eau.net
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
defined('JPATH_PLATFORM') or die;
/**
* Pagination Class. Provides a common interface for content pagination for the
* Joomla! Platform.
*
* @package Joomla.Platform
* @subpackage HTML
* @since 11.1
*/
function pagination_list_render($list)
{
// Reverse output rendering for right-to-left display.
$app = JFactory::getApplication();
$html = '<nav><ul class="pagination">';
$html .= $list['start']['data'];
$html .= $list['previous']['data'];
foreach ($list['pages'] as $page)
{
$html .= $page['data'];
}
$html .= $list['next']['data'];
$html .= $list['end']['data'];
$html .= '</ul></nav>';
return $html;
}
/**
* Method to create an active pagination link to the item
*
* @param JPaginationObject &$item The object with which to make an active link.
*
* @return string HTML link
*
* @since 11.1
*/
function pagination_item_active(&$item)
{
$app = JFactory::getApplication();
if ($app->isAdmin())
{
if ($item->base > 0)
{
return "<li class=\"page-item\"><a class=\"page-link\" title=\"" . $item->text . "\" onclick=\"document.adminForm." . $this->prefix . "limitstart.value=" . $item->base
. "; Joomla.submitform();return false;\">" . $item->text . "</a></li>";
}
else
{
return "<li class=\"page-item\"><a class=\"page-link\" title=\"" . $item->text . "\" onclick=\"document.adminForm." . $this->prefix
. "limitstart.value=0; Joomla.submitform();return false;\">" . $item->text . "</a></li>";
}
}
else
{
return "<li class=\"page-item\"><a class=\"page-link\" title=\"" . $item->text . "\" href=\"" . $item->link . "\">" . $item->text . "</a></li>";
}
}
/**
* Method to create an inactive pagination string
*
* @param object &$item The item to be processed
*
* @return string
*
* @since 11.1
*/
function pagination_item_inactive(&$item)
{
$app = JFactory::getApplication();
if ($app->isAdmin())
{
return "<li class=\"page-item\"><a class=\"page-link\" href=\"#\">" . $item->text . "</a></li>";
}
else
{
return "<li class=\"disabled\"><a class=\"page-link\" href=\"#\">" . $item->text . "</a></li>";
}
}
A PROPOS DE L'AUTEUR :
Webmaster freelance passionné par Joomla depuis 2007, Daniel défend la veuve et l'orphelin du web en créant des sites respectueux du W3C. Fort d'une expérience de plusieurs années, il partage ses connaissances dans un état d'esprit open source.
Daniel est également très impliqué dans la communauté Joomla depuis 2014 en étant membre actif de plusieurs projets, conférencier et fondateur du JUG Breizh.