I do not know what is the cause of this:

The template.php contains:

<?php function phptemplate_preprocess_page(&$vars) {
  $vars['tabs2'] = menu_secondary_local_tasks();
  switch($hook) {
    case 'node':
    case 'page':
      if (module_exists('service_links')) {
        $vars['service_links'] = theme('links', service_links_render($vars['node'], TRUE));
      }
      break;
  }
  return $vars;
}
?>

The node.tpl.php has the following code:

/* Stuff */ 
<div class="node_sociable"><?php print $service_links ?></div> 
/* Other stuff */ 

Caches have been cleaned, user permissions are double-checked and Service links preferences are set to display on all node types, yet all that is returned is <div class="node_sociable"></div>.

Comments

NiklasBr’s picture

Category: support » bug

I strongly suspect that it is <?php print $service_links ?> that is not working as it should because <?php print $node->content['service_links']['#value']; ?> is working as it should.

emilyf’s picture

I too am having problems with this. I was able to add this to my node template file to get them to print:
<?php print theme('service_links_node_format', service_links_render($node, TRUE)); ?>

However, I don't want the node formatting as I have my own styles and wording I want to apply. I would like to be able to JUST print the links themselves, but the only way I've been able to do it is to modify service_links_node_format function directly in the module. It would be really helpful if the template.php example could be updated to show a proper example.

TheCrow’s picture

Status: Active » Closed (won't fix)
NiklasBr’s picture

Why?

TheCrow’s picture

1.x is not more supported and 2.x has a template.php better documentated