Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Tao themes the views mini pager, but passes incorrect arguments to theme_links.
See:
$links = array();
if ($pager_total[$element] > 1) {
$links['pager-previous'] = theme('pager_previous', array(
'text' => (isset($tags[1]) ? $tags[1] : t('Prev')),
'element' => $element,
'interval' => 1,
'parameters' => $parameters
));
$links['pager-current'] = array(
'title' => t('@current of @max', array(
'@current' => $pager_current,
'@max' => $pager_max)
)
);
$links['pager-next'] = theme('pager_next', array(
'text' => (isset($tags[3]) ? $tags[3] : t('Next')),
'element' => $element,
'interval' => 1,
'parameters' => $parameters
));
return theme('links', array('links' => $links, 'attributes' => array('class' => array('links', 'pager', 'views-mini-pager'))));
}
Compared to the one from views:
if ($pager_total[$element] > 1) {
$items[] = array(
'class' => array('pager-previous'),
'data' => $li_previous,
);
$items[] = array(
'class' => array('pager-current'),
'data' => t('@current of @max', array('@current' => $pager_current, '@max' => $pager_max)),
);
$items[] = array(
'class' => array('pager-next'),
'data' => $li_next,
);
return theme('item_list',
array(
'items' => $items,
'title' => NULL,
'type' => 'ul',
'attributes' => array('class' => array('pager')),
)
);
Tao needs to switch from using theme_links to theme_item_list.
Comment | File | Size | Author |
---|---|---|---|
#13 | custom_pager_is_broken-1367208-13.patch | 6.48 KB | m4olivei |
#8 | custom_pager_is_broken-1367208-8.patch | 5.68 KB | annya |
Comments
Comment #1
Taxoman CreditAttribution: Taxoman commentedComment #2
DuaelFrThe
tao_pager_link
function still returns an unexpected answer.Why this choice ?
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedAlso Views Litepager won't render properly when using for example Rubik - which requires Tao. Got it fixed in this issue: https://drupal.org/node/2075009
Comment #4
haydeniv CreditAttribution: haydeniv commentedThis patch should fix the pager issue.
Comment #5
haydeniv CreditAttribution: haydeniv commentedFixed mini pager but breaks full pager.
Comment #6
annya CreditAttribution: annya commentedAs I see problem with mini pager was fixed in Tao-7.x-3.1. I think it was done in this issue https://www.drupal.org/node/1422958
But the problem of compatibility with views_litepager(comment) still exists. I changed title due to this reason.
Comment #7
annya CreditAttribution: annya commentedComment #8
annya CreditAttribution: annya commentedI investigated this problem and discovered following:
I create patch to fix this. It work with:
Please review this patch.
Comment #9
haydeniv CreditAttribution: haydeniv commentedLooks fine. Committed to dev.
Comment #11
annya CreditAttribution: annya commentedWow that was fast! Thanks!
Comment #13
m4oliveiFor anyone needing a patch against 7.x-3.1, attached. Also includes some CSS tweaks that were needed with Rubik theme to avoid core styles for .item-list messing things up.