You are here

function biblio_get_title_url_info in Bibliography Module 6

Same name and namespace in other branches
  1. 6.2 biblio.module \biblio_get_title_url_info()
  2. 7 biblio.module \biblio_get_title_url_info()
  3. 7.2 biblio.module \biblio_get_title_url_info()
8 calls to biblio_get_title_url_info()
biblio_style_ama in ./biblio_style_ama.inc
biblio_style_apa in ./biblio_style_apa.inc
Apply a bibliographic style to the node
biblio_style_chicago in ./biblio_style_chicago.inc
Apply a bibliographic style to the node
biblio_style_classic in ./biblio_style_classic.inc
Apply a bibliographic style to the node
biblio_style_cse in ./biblio_style_cse.inc

... See full list

File

./biblio.module, line 2422

Code

function biblio_get_title_url_info($node, $base = 'biblio', $inline = FALSE) {
  $new_window = NULL;
  if (variable_get('biblio_link_title_url', 0) && !empty($node->biblio_url)) {
    $path = $node->biblio_url;
    if (variable_get('biblio_links_target_new_window', null)) {
      $new_window = array(
        'target' => '_blank',
      );
    }
  }
  else {
    $language = isset($node->language) ? $node->language : '';
    $view_mode = $inline ? 'viewinline' : 'view';
    if (module_exists('biblio_client')) {
      $path = $base . '/' . $view_mode . '/' . $node->nid;
    }
    else {
      $node_path = 'node/' . $node->nid;
      $path = drupal_get_path_alias($node_path, $language);
    }
  }
  return array(
    'link' => $path,
    'options' => array(
      'attributes' => $new_window,
      'html' => TRUE,
    ),
  );
}