I'm not sure if there is a solution for this. If a visitor is browsing the B's, and is on page 5, all the corresponding alpha pager links are also set to page 5. My site owner wants the visitor to start at page 1 of each letter.
The following hack seems to work for me. Obviously not happy doing a hack, so if there are any better solutions I'm happy to hear.
function theme_alpha_pager_link($item, $item_display, $attributes = array(), $path = '', $query = '') {
/*
if ($query != '') {
$query .= '&';
}
$query .= 'apage='. $item;
*/
// Force all alpha pager links to have no "page=x"
// For some reason this does not break the actual numeric pager links.
$query = 'apage='. $item;
$attributes['title'] = t('Go to @page listings', array('@page' => $item));
return l($item_display, $path, $attributes, $query);
}
Comments
Comment #1
Anonymous (not verified) commentedI find this to be a problem as well. The page should always default to 1 when choosing a new letter.
By the way, I think this should really be a bug report...not so much support request.
I've updated the above hack for views_alpha_pager 1.4......although I too hate hacks.
Comment #2
alanburke commentedI guess it might just be a personal opinion,
but I feel that this is a bug too.
[This is the kind of stuff that good uasbility testing could decide, rather than "I think" this is how it should function]
Alan
Comment #3
douggreen commentedThanks! The fix was something relatively minor, adding 'page' to array in drupal_query_string_encode(). I've checked this in, and it's now available in the dev release.
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.