BS4 pagination classnames
gabisajr opened this issue · comments
Musawenkosi Sikhosana commented
Hi,
I hit rock bottom been using the class for the past to years to get things in order.
BS4 has page-item and page-link, for <li> & <a>
..
Check it out on your side and see if it works well
` ```
private function _show_previous()
{
$output = '';
// if "always_show_navigation" is TRUE or
// if the number of total pages available is greater than the number of selectable pages
// it means we can show the "previous page" link
if ($this->_properties['always_show_navigation'] || $this->_properties['total_pages'] > $this->_properties['selectable_pages'])
// if we're on the first page, the link is disabled
$output = '<li' . ($this->_properties['page'] == 1 ? ' class="disabled page-item"' : ' class="page-item"') . '><a class="page-link" href="' .
// the href is different if we're on the first page
($this->_properties['page'] == 1 ? 'javascript:void(0)' : $this->_build_uri($this->_properties['page'] - 1)) . '"' .
// good for SEO
// http://googlewebmastercentral.blogspot.de/2011/09/pagination-with-relnext-and-relprev.html
' rel="prev">' .
($this->_properties['reverse'] ? $this->_properties['next'] : $this->_properties['previous']) . '</a></li>';
// return the resulting string
return $output;
}
Stefan Gabos commented
This is now fixed in 2.3
Thanks!