[Jifty-commit] r3937 - jifty/trunk/lib/Jifty/Plugin/SkeletonApp

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Wed Aug 22 11:38:30 EDT 2007


Author: audreyt
Date: Wed Aug 22 11:38:30 2007
New Revision: 3937

Modified:
   jifty/trunk/lib/Jifty/Plugin/SkeletonApp/Dispatcher.pm

Log:
* Jifty::Plugin::SkeletonApp::Dispatcher - 
  Do not override the 'Home' menu item if the app had set it already.

Modified: jifty/trunk/lib/Jifty/Plugin/SkeletonApp/Dispatcher.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/SkeletonApp/Dispatcher.pm	(original)
+++ jifty/trunk/lib/Jifty/Plugin/SkeletonApp/Dispatcher.pm	Wed Aug 22 11:38:30 2007
@@ -20,7 +20,12 @@
 
 on '**' => run {
     my $top = Jifty->web->navigation;
-    $top->child( Home => url => "/", sort_order => 1, label => _('Home') );
+
+    # Do not override the 'Home' menu item if the app had set it already
+    unless ( $top->child('Home') ) {
+        $top->child( Home => url => "/", sort_order => 1, label => _('Home') );
+    }
+
     if ( Jifty->config->framework('AdminMode') ) {
         $top->child(
             Administration =>


More information about the Jifty-commit mailing list