[Jifty-commit] r7667 - jifty/trunk/lib/Jifty/Web
Jifty commits
jifty-commit at lists.jifty.org
Mon Nov 23 10:37:17 EST 2009
Author: jesse
Date: Mon Nov 23 10:37:14 2009
New Revision: 7667
Modified:
jifty/trunk/lib/Jifty/Web/Menu.pm
Log:
Make it possible to set sort_order for a menu child.
Modified: jifty/trunk/lib/Jifty/Web/Menu.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/Menu.pm (original)
+++ jifty/trunk/lib/Jifty/Web/Menu.pm Mon Nov 23 10:37:14 2009
@@ -174,10 +174,6 @@
} else {
$child = $proto->new(
{ parent => $self,
- sort_order => (
- $self->{children}{$key}{sort_order}
- || scalar values %{ $self->{children} }
- ),
label => $key,
escape_label => 1,
%args
@@ -186,6 +182,11 @@
}
$self->{children}{$key} = $child;
+ $child->sort_order( sort_order =>
+ ( $args{sort_order} ||
+ $self->{children}{$key}{sort_order} ||
+ scalar values %{ $self->{children} } ) );
+
# URL is relative to parents, and cached, so set it up now
$child->url( $child->{url} );
More information about the Jifty-commit
mailing list