Closed (fixed)
Project:
Custom Pagers
Version:
5.x-1.7
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
17 Sep 2007 at 22:17 UTC
Updated:
2 Oct 2007 at 00:42 UTC
I am attempting to center the pager above the node, the .css that is loaded by the function in template.php is loading correctly onto the site. However, the pager seems to be un-affected by this and does not center as it is supposed to.
Am I supposed to rename anything within the custom_pagers.css or move it to my .css for my theme?
my function looks exactly like the following and the custom_pagers.css is the original that came with the module:
function dojocustom_custom_pager($nav_array, $node, $pager) {
drupal_add_css(drupal_get_path('module', 'custom_pagers') .'/custom_pagers.css');
if (is_numeric($nav_array['first'])) {
$first = node_load($nav_array['first']);
}
if (is_numeric($nav_array['prev'])) {
$prev = node_load($nav_array['prev']);
}
if (is_numeric($nav_array['next'])) {
$next = node_load($nav_array['next']);
}
if (is_numeric($nav_array['last'])) {
$last = node_load($nav_array['last']);
}
if ($first || $prev || $next || $last) {
if ($first) {
$links[] = l(t('<<last '), 'node/'. $first->nid, array('class' => 'pager-first', 'title' => $first->title));
}
if ($prev) {
$links[] = l(t('<prev '), 'node/'. $prev->nid, array('class' => 'pager-previous', 'title' => $prev->title));
}
// Word break (a is an inline element)
$links[] = '<span class="pager-count">'. ($nav_array['current_index'] + 1) .' of '. count($nav_array['full_list']) .'</span>';
if ($next) {
$links[] = l(t(' next>'), 'node/'. $next->nid, array('class' => 'pager-next', 'title' => $next->title));
}
if ($last) {
$links[] = l(t(' last>>'), 'node/'. $last->nid, array('class' => 'pager-last', 'title' => $last->title));
}
$output .= '<div class="custom-pager custom-pager-' . $node->type . '">' . implode(' ', $links) . '</div>';
}
return $output;
}
Comments
Comment #1
Ludaen commentedI fiddled with my theme's .css file and removed the "ul" from the beginning of the functions within the custom_pagers.css file and moved them to the theme's .css, that got it to work.
Comment #2
(not verified) commented