contemplate_edit_type
- Versions
- 6 – 7
contemplate_edit_type($type = array())
Code
contrib/contemplate/contemplate.module, line 443
<?php
function contemplate_edit_type($type = array()) {
if (empty($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' => $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->type);
}
else {
contemplate_refresh_files();
return drupal_get_form('contemplate_edit_type_form', $type->type);
}
}
?>


