You are here

function biblio_rtf_biblio_export_link in Bibliography Module 6.2

Same name and namespace in other branches
  1. 7 modules/rtf/biblio_rtf.module \biblio_rtf_biblio_export_link()
  2. 7.2 modules/rtf/biblio_rtf.module \biblio_rtf_biblio_export_link()

Creates a link to export a node (or view) in rtf 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=...>rtf</a>)

1 call to biblio_rtf_biblio_export_link()
biblio_rtf_link in modules/rtf/biblio_rtf.module

File

modules/rtf/biblio_rtf.module, line 45

Code

function biblio_rtf_biblio_export_link($nid = NULL) {
  $show_link = variable_get('biblio_export_links', array(
    'rtf' => TRUE,
  ));
  if (!$show_link['rtf'] || !biblio_access('export')) {
    return array();
  }
  $base = variable_get('biblio_base', 'biblio');
  $link = array(
    'attributes' => array(
      'title' => t("Click to download the rtf formatted file"),
    ),
  );
  $link['href'] = "{$base}/export/rtf/{$nid}";
  $link['title'] = t('RTF');
  return array(
    'biblio_rtf' => $link,
  );
}