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>';
}
CommentFileSizeAuthor
#2 theme.patch1.38 KBjenlampton

Comments

jenlampton’s picture

Title: Remove theme information from not theme function » Use theme functions when markup is returned
Category: bug » task
Status: Active » Needs review

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.

jenlampton’s picture

StatusFileSize
new1.38 KB

It helps if I actually attach the patch :/

jenlampton’s picture

Version: 6.x-1.0-beta3 » 6.x-1.x-dev
Status: Needs review » Fixed

Committed this change.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.