Closed (won't fix)
Project:
Service links
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Sep 2008 at 20:48 UTC
Updated:
27 Oct 2010 at 08:16 UTC
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
Comment #1
NiklasBr commentedI 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.Comment #2
emilyf commentedI 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.
Comment #3
TheCrow commentedComment #4
NiklasBr commentedWhy?
Comment #5
TheCrow commented1.x is not more supported and 2.x has a template.php better documentated