function biblio_xml_biblio_export_link in Bibliography Module 6.2
Same name and namespace in other branches
- 7 modules/endnote/biblio_xml.module \biblio_xml_biblio_export_link()
- 7.2 modules/endnote/biblio_xml.module \biblio_xml_biblio_export_link()
Creates a link to export a node (or view) in xml 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=...>xml</a>)
1 call to biblio_xml_biblio_export_link()
- biblio_xml_link in modules/
endnote/ biblio_xml.module
File
- modules/
endnote/ biblio_xml.module, line 116
Code
function biblio_xml_biblio_export_link($nid = NULL) {
$show_link = variable_get('biblio_export_links', array(
'xml' => TRUE,
));
if (!$show_link['xml'] || !biblio_access('export')) {
return array();
}
$base = variable_get('biblio_base', 'biblio');
$link = array(
'attributes' => array(
'title' => t("Click to download the EndNote XML formatted file"),
),
);
$link['href'] = "{$base}/export/xml/{$nid}";
$link['title'] = t('XML');
return array(
'biblio_xml' => $link,
);
}