hey there,

I'm trying to call service_links_render_some in node.tpl but I just can't get it to work.

would you have a working example to show me?

thanks in advance.

cheers,
Luciano

Comments

TheCrow’s picture

You may look template.php there are several examples about how to build a PHP Template variable.

Instead of:

  if (module_exists('service_links')) {
    if (user_access('access service links') && service_links_show($vars['node'])) {
      $vars['twitter'] = theme('links', array('links' => array($vars['node']->service_links['service-links-twitter'])));
    }
  }

you can try with:

  if (module_exists('service_links')) {
    if (user_access('access service links') && service_links_show($vars['node'])) {
      $vars['twitter_and_mixx'] = implode('', service_links_render_some(array('twitter', 'mixx'), $vars['node'], FALSE));
    }
  }
simon georges’s picture

Component: Code » Documentation
Status: Active » Fixed
TheCrow’s picture

Status: Fixed » Closed (fixed)

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