Posted by drupalnuts on May 22, 2009 at 8:47pm
| Project: | Paging |
| Version: | 6.x-1.0-beta3 |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
Please remove
return '<div class="links">' . $output . '</div>';from the code below and replace it with
return $output;We can move the div into the theming layer were it belongs. My issue is that I am already using a links name for something else in the node.tpl.php. I would expect to be able to override this, but I can not because this is not a themeing function.
Thanks!
function paging_pager_style($node = NULL, $element = NULL) {
$theme_widget = variable_get('paging_pager_widget_' . $node->type, 'pager');
if ($theme_widget == 'custom') {
// Load the custom user function.
$theme_widget = variable_get('paging_pager_widget_custom_' . $node->type, 'pager');
}
if ($theme_widget == 'paging_drop_down') {
// Include CSS for 'Drop down pager' styling.
drupal_add_css(drupal_get_path('module', 'paging') . '/paging.css', 'module');
}
// Decode the comma entity.
$output = str_replace('%2C', ',', theme($theme_widget, NULL, 1, $element, array(), 9, $node->page_names));
return '<div class="links">' . $output . '</div>';
}
Comments
#1
Same request here. I need to change the class on this div (since "links" means something else in Drupal) but can't since it's not in a theme function. Attached patch adds a theme function.
#2
It helps if I actually attach the patch :/