function taxonomy_breadcrumb_form_taxonomy_form_term_alter in Taxonomy Breadcrumb 7
Same name and namespace in other branches
- 6 taxonomy_breadcrumb.module \taxonomy_breadcrumb_form_taxonomy_form_term_alter()
Implements hook_form_FORM_ID_alter().
File
- ./
taxonomy_breadcrumb.module, line 155 - The taxonomy_breadcrumb module generates taxonomy based breadcrumbs on node pages and taxonomy/term pages. The breadcrumb trail takes on the form: [HOME] >> [VOCABULARY] >> TERM >> [TERM] ...
Code
function taxonomy_breadcrumb_form_taxonomy_form_term_alter(&$form, &$form_state) {
if (!(isset($_POST['op']) && $_POST['op'] == t('Delete')) || isset($_POST['confirm'])) {
// Include the .inc file with all helper functions.
module_load_include('inc', 'taxonomy_breadcrumb');
$form['taxonomy_breadcrumb_path'] = array(
'#type' => 'textfield',
'#title' => t('Breadcrumb path (taxonomy_breadcrumb)'),
'#default_value' => _taxonomy_breadcrumb_get_term_path($form['tid']['#value']),
'#maxlength' => 128,
'#description' => t("Specify the path this term links to as a breadcrumb. If blank, the breadcrumb links to the default taxonomy page. Use a relative path and don't add a trailing slash. For example: node/42 or my/path/alias."),
'#weight' => 0,
);
}
}