You are here

function _build_biblio_bibtex_link in Bibliography Module 6

Creates a link to export a node (or view) in BibTEX format

Parameters

$base this is the base url (defaults to /biblio):

$nid the node id, if NULL then the current view is exported:

Return value

a link (<a href=...>BibTEX</a>)

2 calls to _build_biblio_bibtex_link()
biblio_link in ./biblio.module
Implementation of hook_link().
_build_biblio_link in ./biblio_theme.inc
Creates a link to export a node (or view) in EndNote Tagged format

File

./biblio_theme.inc, line 979

Code

function _build_biblio_bibtex_link($base, $nid = NULL) {
  if (module_exists('popups') && !empty($nid)) {
    return array(
      'title' => t('BibTex'),
      'href' => "{$base}/export/bibtex/{$nid}/popup",
      'attributes' => array(
        'class' => 'popups',
        'title' => t("Click to get the BibTEX output "),
      ),
    );
  }
  else {
    return array(
      'title' => t('BibTex'),
      'href' => "{$base}/export/bibtex/{$nid}",
      'attributes' => array(
        'title' => t("Click to download the BibTEX formatted file"),
      ),
    );
  }
}