Commit 962c15fe authored by Matt Glaman's avatar Matt Glaman

Issue #2393519: Show breadcrumbs on account/profile pages

parent 45c1fa72
......@@ -154,9 +154,9 @@ function commerce_kickstart_product_ui_form_alter(&$form, &$form_state, $form_id
* Implements hook_page_alter().
*/
function commerce_kickstart_product_ui_page_alter(&$page) {
// Disable breadcumb on user, checkout and cart pages.
// Disable breadrcumb on checkout and cart pages.
$current_path = current_path();
$exclude_path = "user*\ncheckout/*\ncart";
$exclude_path = "checkout/*\ncart";
$match = drupal_match_path(drupal_strtolower($current_path), drupal_strtolower($exclude_path));
if ($match) {
drupal_set_breadcrumb(array());
......
......@@ -27,3 +27,10 @@ function commerce_kickstart_user_enable() {
throw $e;
}
}
/**
* Implements hook_uninstall().
*/
function commerce_kickstart_user_uninstall() {
variable_del('commerce_kickstart_user_breadcrumbs');
}
......@@ -90,6 +90,17 @@ function commerce_kickstart_user_module_implements_alter(&$implementations, $hoo
}
}
/**
* Implements hook_page_alter().
*/
function commerce_kickstart_user_page_alter(&$page) {
// Disable breadcrumb on user.
$match = drupal_match_path(drupal_strtolower(current_path()), drupal_strtolower('user*'));
if ($match && !variable_get('commerce_kickstart_user_breadcrumbs', FALSE)) {
drupal_set_breadcrumb(array());
}
}
/**
* Implements hook_form_FORM_ID_alter().
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment