diff --git a/file_metadata_table.api.php b/file_metadata_table.api.php
index c1a4fbe..04b49e5 100644
--- a/file_metadata_table.api.php
+++ b/file_metadata_table.api.php
@@ -30,7 +30,7 @@ function hook_file_metadata_table_metadata_types() {
     'cid' => array(
       'title' => t('Comment ID'),
       'sort' => 'numeric',
-      'formatter' => 'project_issue_generate_cid_jumplink',
+      'formatter' => 'mymodule_file_metadata_cid_formatter',
     ),
   );
 }
@@ -140,3 +140,44 @@ function hook_file_metadata_table_output_alter(&$elements, &$context) {
     }
   }
 }
+
+/**
+ * Implements a file metadata property formatter.
+ *
+ * Used to format the output for an externally provided metadata property.  The
+ * actual function name must match that given in the 'formatter' property for
+ * this metadata type, as defined in hook_file_metadata_table_metadata_types().
+ * This function is passed the complete $file item for context, but should only
+ * return the output for the particular piece of metadata defined.
+ *
+ * @param array $item
+ *   An array of file metadata types and values for the file in question.
+ * @param array $context
+ *   Associative array of context for the table of files being altered, with
+ *   the following keys:
+ *   - field: The field definition array.
+ *   - instance: The field instance definition array.
+ *   - entity: An object representing the entity the file field is attached to.
+ *   - entity_type: String with the type of entity the field is attached to.
+ *   - langcode: The language associated with $items.
+ *   - display: The display settings to use, as found in the 'display' entry of
+ *     the instance definition. Notable keys include the name of the formatter
+ *     (in 'type') and the array of formatter settings (in 'settings').
+ *
+ * @return array or string
+ *   A render array defining the table cell contents for this file/metadata
+ *   combination, or alternatively an html string defining the actual rendered
+ *   output.
+ */
+function mymodule_file_metadata_cid_formatter($item, $context) {
+  // Generate formatted Comment ID jumplinks for a file, based on the 'cid'
+  // metadata property.
+  $entity = $context['entity'];
+  if ($item['cid'] === 0) {
+    $data = l('none', 'node/' . $entity->nid, array('fragment' => 'content'));
+  }
+  else {
+    $data = l('#' . comment_get_display_ordinal($item['cid'], $entity->type), 'node/' . $entity->nid, array('fragment' => 'comment-' . $item['cid']));
+  }
+  return $data;
+}
diff --git a/file_metadata_table.module b/file_metadata_table.module
index d2e2bfc..6476fa5 100644
--- a/file_metadata_table.module
+++ b/file_metadata_table.module
@@ -386,7 +386,7 @@ function file_metadata_table_field_formatter_view($entity_type, $entity, $field,
     $row = array();
     foreach ($settings['columns'] as $column) {
       $row[$column] = array(
-        'data' => file_metadata_table_celldata($column, $item),
+        'data' => file_metadata_table_celldata($column, $item, $context),
         'name' => 'file-metadata-table-' . $column . '-' . $item['fid'],
         'class' => 'file-metadata-table-' . $column,
       );
@@ -542,14 +542,25 @@ function file_metadata_table_header($columns) {
  *   The name of the column (i.e. $items property key) being generated.
  * @param array $item
  *   The file being rendered within this row.
+ * @param array $context
+ *   Associative array of context for the table of files being altered, with
+ *   the following keys:
+ *   - field: The field definition array.
+ *   - instance: The field instance definition array.
+ *   - entity: An object representing the entity the file field is attachted to.
+ *   - entity_type: String with the type of entity the field is attached to.
+ *   - langcode: The language associated with $items.
+ *   - display: The display settings to use, as found in the 'display' entry of
+ *     the instance definition. Notable keys include the name of the formatter
+ *     (in 'type') and the array of formatter settings (in 'settings').
  *
  * @return
  *   The render array or HTML value for inclusion in this cell.
  */
-function file_metadata_table_celldata($column, $item) {
+function file_metadata_table_celldata($column, $item, $context) {
   $metadata = file_metadata_table_metadata_types();
   if (!empty($metadata[$column]['formatter']) && function_exists($metadata[$column]['formatter'])) {
-    $data = $metadata[$column]['formatter']($item);
+    $data = $metadata[$column]['formatter']($item, $context);
   }
   else {
     switch ($column) {
