contemplate_edit_type

Versions
5 – 6
contemplate_edit_type($type = NULL)
7
contemplate_edit_type($type = array())

Code

contrib/contemplate/contemplate.module, line 442

<?php
function contemplate_edit_type($type = NULL) {
  $types = node_get_types();

  if (empty($types[$type])) { // if the argument isn't a valid node type, output admin page
    return contemplate_admin();
  }
  drupal_set_title(t('Template for %type', array('%type' => $types[$type]->name)));
  if (arg(0) == 'admin' && arg(1) == 'content' && arg(4) == 'template') {
    $breadcrumbs = drupal_get_breadcrumb();
    $type_crumb = array_pop($breadcrumbs);
    array_push($breadcrumbs, l(t('Templates'), 'admin/content/types/templates'), $type_crumb);
    drupal_set_breadcrumb($breadcrumbs);
  }
  if (arg(5) == 'delete') {
    return drupal_get_form('contemplate_delete_type_form', $type);
  }
  else {
    contemplate_refresh_files();
    return drupal_get_form('contemplate_edit_type_form', $type);
  }
}
?>