Dear visitor who can read English
This page is a page translated automatically by Google AJAX Language API.
Please comment to this page if you could not understand. A PERSON will review this page .
I think that you will be able to understand this page later. Please give a little time to us.
Best regards,
This site is support & information site of WEB,and Software. This site might help you that create software or Web Site…perhaps?[:]
Joomla!
I would like to customize the page navigation in the template.
Joomla!
So, if there are multiple pages of information and a list will appear the following PEJINABI.
If you do not, Joomla!
Standard templates are included in the "ja_purity", please copy.
/templates/ja_purity/html/pagination.php
, Using /templates/%templatedirectory%/html/. Copy.
Is written in this function, the following are four large.
pagination_list_footer - Sets the PEJINABI footer.
pagination_list_render - Set the order of PEJINABI.
pagination_item_active - Active PEJINABI (now hide the page) to create the output image of the page output.
pagination_item_inactive - Inactive PEJINABI (current page you are viewing) to create the output image of the page output.
※ PEJINABI view of the conduct in fact, a function of the bottom three.
(pagination_list_footer will not use.
)
Each role is as follows.
So, first, two simple function (pagination_item_active, pagination_item_inactive) I'll explain.
The following is the actual "ja_purity/html/pagination.php" source code.
1
2
3
4
5
6
7
8
9
10
// * $item->base : integer Offset is the number of pages (for example, in ascending page 2 (10 items / page) and the second 20 or will be)// * $item->link : string Address of the page number links// * $item->text : string Corresponds to the page numberfunction pagination_item_active(&$item){return"<li> <strong><a href=\"".$item->link."\" title=\"".$item->text."\">".$item->text."</a></strong> </li>";}// * pagination_item_active に同じfunction pagination_item_inactive(&$item){return"<li> <span>".$item->text."</span> </li>";}
And a brief description, pagination_item_active, Paste a link to the page number and HTML output.
pagination_item_inactive, The only number we printed the HTML page.
And showed that the number of buttons, if you want to use the symbolic representation, you should change the output of the above information.
Next, pagination_list_render. This function is to decide the order, you can set the string.
// * $list[all] Information for the entire list// * [data] : string Data List// * [active] : boolean Active / Inactive Flag// * $list[start] First List// * [data] : string The first data of the list// * [active] : boolean Active / Inactive Flag// * $list[previous] Previous List// * [data] : string Data to the list// * [active] : boolean Active / Inactive Flag// * $list[next] Next List// * [data] : string Data to the following list// * [active] : boolean Active / Inactive Flag// * $list[end] Bottom of the list// * [data] : string Bottom of the list data// * [active] : boolean Active / Inactive Flag// * $list[pages] Each page lists// * [{PAGE}][data] : string Data of each page list// * [{PAGE}][active] : boolean Active / Inactive Flagfunction pagination_list_render($list){// Initialize variables$lang=& JFactory::getLanguage();$html="<ul class=\"pagination\">";$html.='<li>«</li>';// Reverse output rendering for right-to-left displayif($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;}
And a brief description, Before the first (page): <br> and last in the order of output.
However, the (page) and switch to switch the language or area in the ascending or descending order only.
Or use the intuitive navigation to images, symbols or TSUKAっby adding here, can be changed to suit taste.
For example, line 28
1
$html.=$list['start']['data'];
A
1
$html.='★'.$list['start']['data'];
By changing to, "★ First" will be displayed.
Page Navi made a mistake or you will be able to change it as you think if it is thought that it is a poor usability.
Leave a Reply