You are here

function theme_node_import_mapping_table in Node import 5

Theme table of field mappings.

1 theme call to theme_node_import_mapping_table()
_node_import_mapping in ./node_import.module

File

./node_import.module, line 718
This modules provides a wizard at "administer >> content >> import" to import a CSV file with nodes.

Code

function theme_node_import_mapping_table($form) {
  $data = array();
  foreach ($form as $id => $select) {
    if (is_numeric($id)) {
      $title = $select['#title'];
      unset($select['#title']);
      $samples = $select['#description'];
      unset($select['#description']);
      $row = array();
      $row[] = $title;
      $row[] = drupal_render($select);
      $row[] = $samples;
      $data[] = $row;
    }
  }
  $header = array(
    t('CSV header'),
    t('Import to field'),
    t('Sample data'),
  );
  $output = theme('table', $header, $data);
  return $output;
}