I notice that if I enable the block created by service links I also need to enable the content types in the service links admin interface.

When I do this however, both the service links are duplicated because it it outputted both as a block and as an attachment to the content type.

I had to comment out one of the render functions to solve this. Would be grateful if a switch would be implemented for block/content type attachment...

function theme_service_links_node_format($links) {
// MY MOD
 // return '<div class="service-links"><div class="service-label">'. t('Bookmark/Search this post with: ') .'</div>'. theme('links', $links) .'</div>';
}

Comments

xjessie007’s picture

I agree. I was facing the same problem and this solution worked for me too.

Just for reference, there are two functions in service_links.module.

The theme_service_links_node_format() is responsible for theming the output when it is appended to the node.

The theme_service_links_block_format() function themes the content if you display it as a block. So, if you want to display the service links as a block but not in the sidebar but let's say at the top of the post, you need to modify this function here a little because it displays the service links as UL-LI by default which is ok for sidebar block but not very nice for a top/bottom content block.

hook_block() is where the output is passed to Drupal.

Note, here are other Drupal thread related to the same or similar problem:

http://drupal.org/node/257361
http://drupal.org/node/288612
http://drupal.org/node/214939

__________________
Drupal cache clean up - cache_clear_all()
How to delete or clear Drupal cache tables?

TheCrow’s picture

Category: support » feature
Status: Active » Fixed

service links display independent in node and block

Status: Fixed » Closed (fixed)

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