Change pagination menu
From OSClass
Pagination menu can be customized in several ways. There're a few functions very handy for this.
Contents |
osc_search_pagination()
This function add the default zero-configuration pagination for the search pages.
osc_comments_pagination()
This function add the default zero-configuration pagination for the item's comments pages.
osc_pagination()
This is the base function. Previous functions call internally this function. If no-parameter is passed it's the same as osc_search_function.
Parameters
- 'total' => number of total pages (default osc_search_total_pages())
- 'selected' => number of the page selected (starting at 0) (default osc_search_page())
- 'class_first' => css class for the first link (default 'searchPaginationFirst')
- 'class_last' => css class for the last link (default 'searchPaginationLast')
- 'class_prev' => css class for the prev link (default 'searchPaginationPrev')
- 'class_next' => css class for the next link (default 'searchPaginationNext')
- 'text_first' => text for the first link ('<<', 'First', ...) (default '«')
- 'text_prev' => text for the first link ('<', 'Previous.', ...) (default '»')
- 'text_next' => text for the first link ('>', 'Next', ...) (default '<')
- 'text_last' => text for the lastst link ('>>', 'Last', ...) (default '>')
- 'class_selected' => css class for the selected link (default 'searchPaginationSelected')
- 'class_non_selected' => css class for non selected links (default 'searchPaginationNonSelected')
- 'delimiter' => delimiter between links (default " ")
- 'force_limits' => Always show the first/last links even if you're already on first/last page (default false)
- 'sides' => How many pages to show (default 2)
- 'url' => Format of the URL of the links, put "{PAGE}" on the page variable. Example http://www.example.com/index.php?page=search&sCategory=2&iPage={PAGE} (default osc_update_search_url(array('iPage' => '{PAGE}'))
