--- lib/A3C/View/Strix.pm 2008/06/20 20:44:18 213 +++ lib/A3C/View/Strix.pm 2008/06/20 20:54:41 214 @@ -405,20 +405,21 @@ ); if ( my $site_id = $action->result->content('site_id') ) { - show('strix-site-navigation-tree', $action->result->content('instance'), $site_id); + show('navigation-tree', $action->result->content('instance'), $site_id); } }; =head1 PRIVATE TEMPLATES -=head2 strix-site-navigation-tree +=head2 navigation-tree-category - show('strix-site-navigation-tree',$instance,$site_id); + show('navigation-tree-category',$kat_row); =cut -private template 'select-category' => sub { +private template 'navigation-tree-category' => sub { my $self = shift; + #warn "## navigation-tree-category",dump( @_ ); my $p = shift; strix_link( $p->{url}, $p->{naziv} ); if ( $p->{type} eq 'category' ) { @@ -439,7 +440,13 @@ } }; -private template 'strix-site-navigation-tree' => sub { +=head2 navigation-tree + + show('navigation-tree',$instance,$site_id); + +=cut + +private template 'navigation-tree' => sub { my $self = shift; my ( $instance, $site_id ) = @_; @@ -457,7 +464,7 @@ if ( defined( $p->{class} ) ) { { class is $p->{class} }; } - show( 'select-category', $p ); + show( 'navigation-tree-category', $p ); children( $p ); } } @@ -466,12 +473,13 @@ my $strix = Strix->new({ instance => $instance }); - my @navigation = @{ $strix->site_navigation( $site_id ) }; - if ( @navigation ) { + my $navigation = $strix->site_navigation( $site_id ); + #warn "## navigation = ",dump( $navigation ); + if ( $navigation ) { ul { - foreach my $p ( @navigation ) { + foreach my $p ( @$navigation ) { li { - show( 'select-category', $p ); + show( 'navigation-tree-category', $p ); children( $p ); } }