Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function mytheme_views_mini_pager__myview($tags = array(), $limit = 10, $element = 0, $parameters = array(), $quantity = 9) {
- global $pager_page_array, $pager_total;
- // Calculate various markers within this pager piece:
- // Middle is used to "center" pages around the current page.
- $pager_middle = ceil($quantity / 2);
- // current is the page we are currently paged to
- $pager_current = $pager_page_array[$element] + 1;
- // max is the maximum page number
- $pager_max = $pager_total[$element];
- // End of marker calculations.
- $prev = t('Older Posts', array('class' => 'action back'));
- $prev_2 = t('Older Posts', array('class' => 'action back'));
- $nex = t('Newer Posts', array('class' => 'action')) ;
- $li_previous = theme('pager_previous', (isset($tags[1]) ? $tags[1] : $prev), $limit, $element, 1, $parameters);
- if (empty($li_previous)) {
- $li_previous = " ";
- }
- $li_next = theme('pager_next', (isset($tags[3]) ? $tags[3] : $nex), $limit, $element, 1, $parameters);
- if (empty($li_next)) {
- $li_next = " ";
- }
- if ($pager_total[$element] > 1) {
- $items[] = array(
- 'class' => 'pager-previous',
- 'data' => $li_previous,
- );
- $items[] = array(
- 'class' => 'pager-next',
- 'data' => $li_next,
- );
- return theme('item_list', $items, NULL, 'div', array('class' => 'articlePagination'));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement