function theme_node_import_mapping_table in Node import 5
Theme table of field mappings.
1 theme call to theme_node_import_mapping_table()
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;
}