Permalink
Browse files

Added new hook to extension.

Updated extension with additional hook (cp_css_end) to eliminate need
for theme hack to hide breadcrumbs before module had a chance to update
via JS.
  • Loading branch information...
1 parent 20f3520 commit eb659f103ec71e946dffcd965826a0f77bd49f31 Chris Monnat committed Sep 16, 2011
Showing with 17 additions and 0 deletions.
  1. +17 −0 third_party/dashee/ext.dashee.php
@@ -67,6 +67,7 @@ public function activate_extension()
$this->settings = array();
$hooks = array(
+ 'cp_css_end' => 'crumb_hide',
'cp_js_end' => 'crumb_remap',
'cp_member_login' => 'member_redirect',
);
@@ -89,6 +90,22 @@ public function activate_extension()
// ----------------------------------------------------------------------
/**
+ * Hide Breadcrumb Nav
+ *
+ * Adds CSS to CP to hide breadcrumb nav. Module will display with JS once
+ * the page is fully loaded. This is to prevent the breadcrumb nav from being
+ * displayed before it has been updated by module JS.
+ *
+ * @return string
+ */
+ public function crumb_hide()
+ {
+ return '#breadCrumb ol { display:none; }';
+ }
+
+ // ----------------------------------------------------------------------
+
+ /**
* Remap Breadcrumb Nav
*
* Returns JS to modify default main nav home button, breadcrumb href

0 comments on commit eb659f1

Please sign in to comment.