You are here

function theme_link_formatter_separate in Link 6

Same name and namespace in other branches
  1. 6.2 link.theme.inc \theme_link_formatter_separate()

Theme function for 'separate' text field formatter.

File

./link.module, line 577
Defines simple link field types.

Code

function theme_link_formatter_separate($element) {
  $class = empty($element['#item']['attributes']['class']) ? '' : ' ' . $element['#item']['attributes']['class'];
  unset($element['#item']['attributes']['class']);
  $output = '';
  $output .= '<div class="link-item ' . $class . '">';
  $output .= '<div class="link-title">' . (empty($element['#item']['title']) ? '' : $element['#item']['display_title']) . '</div>';
  $output .= '<div class="link-url">' . l($element['#item']['display_url'], $element['#item']['url'], $element['#item']) . '</div>';
  $output .= '</div>';
  return $output;
}