You are here

function matrix_format_prepare_links in Matrix field 6.2

Prepare any special links (eg export link)

Parameters

$nid Node ID:

$field_name the name of the field:

Return value

HTML string

2 calls to matrix_format_prepare_links()
content-field-field_fieldname.tpl.php in ./content-field-field_fieldname.tpl.php
content-field.tpl.php Default theme implementation to display the value of a field.
theme_matrix_formatter_default in ./matrix.module
Theme function for 'default' text field formatter.

File

./matrix.module, line 1111
Defines simple matrix field types.

Code

function matrix_format_prepare_links($nid, $field_name) {
  $links = array();
  if (user_access('export matrix')) {
    $links[] = l(t('Export data'), 'matrix/export/' . $nid . '/' . $field_name);
  }
  return implode("<br />", $links);
}