Настройка навигации по страницам pagination (Назад, Далее) в Joomla 1.7
При установке некоторых шаблонов в joom 1.7 навигация по страницам "pagination" может выглядеть в столбик, что бы это исправить необходимо создать файл pagination.php в utf-8 без bom с текстом
<?php
// no direct access
defined('_JEXEC') or die('Restricted access');
/**
* This is a file to add template specific chrome to pagination rendering.
* pagination_list_footer * Input variable $list is an array with offsets:
* $list[limit] : int
* $list[limitstart] : int
* $list[total] : int
* $list[limitfield] : string
* $list[pagescounter] : string
* $list[pageslinks] : string
*
* pagination_list_render
* Input variable $list is an array with offsets:
* $list[all]
* [data] : string
* [active] : boolean
* $list[start]
* [data] : string
* [active] : boolean
* $list[previous]
* [data] : string
* [active] : boolean
* $list[next]
* [data] : string
* [active] : boolean
* $list[end]
* [data] : string
* [active] : boolean
* $list[pages]
* [{PAGE}][data] : string
* [{PAGE}][active] : boolean
*
* pagination_item_active
* Input variable $item is an object with fields:
* $item->base : integer
* $item->link : string
* $item->text : string
*
* pagination_item_inactive
* Input variable $item is an object with fields:
* $item->base : integer
* $item->link : string
* $item->text : string
*
* This gives template designers ultimate control over how pagination is rendered.
*
* NOTE: If you override pagination_item_active OR pagination_item_inactive you MUST override them both
*/
function pagination_list_footer($list)
{
// Initialize variables
$lang =& JFactory::getLanguage();
$html = "<div class=\"list-footer\">\n";
if ($lang->isRTL())
{
$html .= "\n<div class=\"counter\">".$list['pagescounter']."</div>";
$html .= $list['pageslinks'];
$html .= "\n<div class=\"limit\">".JText::_('Display Num').$list['limitfield']."</div>";
}
else
{
$html .= "\n<div class=\"limit\">".JText::_('Display Num').$list['limitfield']."</div>";
$html .= $list['pageslinks'];
$html .= "\n<div class=\"counter\">".$list['pagescounter']."</div>";
}
$html .= "\n<input type=\"hidden\" name=\"limitstart\" value=\"".$list['limitstart']."\" />";
$html .= "\n</div>";
return $html;
}
function pagination_list_render($list)
{
// Initialize variables
$lang =& JFactory::getLanguage();
$html = "<ul class=\"pagination\">";
//$html .= '<li>«</li>';
// Reverse output rendering for right-to-left display
if($lang->isRTL())
{
$html .= $list['start']['data'];
$html .= $list['previous']['data'];
$list['pages'] = array_reverse( $list['pages'] );
foreach( $list['pages'] as $page ) {
if($page['data']['active']) {
// $html .= '<strong>';
}
$html .= $page['data'];
if($page['data']['active']) {
// $html .= '</strong>';
}
}
$html .= $list['next']['data'];
$html .= $list['end']['data'];
// $html .= '«';
}
else
{
$html .= $list['start']['data'];
$html .= $list['previous']['data'];
foreach( $list['pages'] as $page )
{
if($page['data']['active']) {
// $html .= '<strong>';
}
$html .= $page['data'];
if($page['data']['active']) {
// $html .= '</strong>';
}
}
$html .= $list['next']['data'];
$html .= $list['end']['data'];
// $html .= '«';
}
//$html .= '<li>»</li>';
$html .= "</ul>";
return $html;
}
function pagination_item_active(&$item) {
return "<li><a href=\"".$item->link."\">".$item->text."</a></li>";
}
function pagination_item_inactive(&$item) {
return "<li><strong><span>".$item->text."</span></strong></li>";
}
?>
и положить его в папку html шаблона
далее прописать в css следующий код
/*Начало постраничной навигации*/
.blokpagnav {
text-align: center;
vertical-align: top;
}
ul.pagination {
margin: 15px 5px 15px 0;
padding: 10px 0;
}
ul.pagination li {
margin: 0;
padding: 0;
display: inline;
}
ul.pagination li span{
margin-right:2px;
margin-left:2px;
padding: 2px 5px;
border: 1px solid #E2E2E2;
display: inline;
}
ul.pagination a {
margin-right:2px;
margin-left:2px;
padding: 2px 5px;
border: 1px solid #E2E2E2;
}
ul.pagination a:hover, ul.pagination a:active, ul.pagination a:focus {
color: #747474;
border: 1px solid #dadada;
background: #ededed;
text-decoration: none;
}