You are here

function theme_service_links_node_format in Service links 7.2

Same name and namespace in other branches
  1. 5 service_links.module \theme_service_links_node_format()
  2. 6.2 service_links.theme.inc \theme_service_links_node_format()
  3. 6 service_links.module \theme_service_links_node_format()

Format the items shown in the node.

1 theme call to theme_service_links_node_format()
service_links_node_view in ./service_links.module
Implements hook_node_view().

File

./service_links.theme.inc, line 104
Theme function used by Service Links.

Code

function theme_service_links_node_format($variables) {
  $links = $variables['links'];
  $label = $variables['label'];
  $view_mode = $variables['view_mode'];
  $node_type = $variables['node_type'];
  if ($view_mode == 'rss') {
    $result = array();
    foreach ($links as $l) {
      $result[] = l($l['title'], $l['href'], $l);
    }
    return '<div class="service-links">' . implode(' ', $result) . '</div>';
  }
  if (isset($label) && !empty($label)) {
    return '<div class="service-links"><div class="service-label">' . t('@label', array(
      '@label' => $label,
    )) . ' </div>' . theme('links', array(
      'links' => $links,
    )) . '</div>';
  }
  else {
    return '<div class="service-links">' . theme('links', array(
      'links' => $links,
    )) . '</div>';
  }
}