/[A3C]/lib/A3C/View/Strix.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/A3C/View/Strix.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 171 by dpavlin, Sun Jun 15 22:26:07 2008 UTC revision 172 by dpavlin, Mon Jun 16 13:32:01 2008 UTC
# Line 107  template 'sql' => page { Line 107  template 'sql' => page {
107    
108  };  };
109    
110    =head2 sitemap
111    
112    =cut
113    
114    template 'sitemap' => page {
115    
116            title is _('Sitemap');
117    
118            my $strix = Strix->new({ site => 'new' });
119            my $sitemap = $strix->site_navigation( 1 );
120    
121            sub full_url {
122                    my $p = shift;
123                    hyperlink(
124                            url => 'http://new.cms-qa.skole.hr' . $p->{url},
125                            label => $p->{naziv},
126                    );
127            }
128    
129            sub children {
130                    my $c = shift;
131                    return unless defined $c->{children};
132                    ul {
133                            foreach my $p ( @{ $c->{children} } ) {
134                                    li {
135                                            full_url( $p );
136                                            children( $p );
137                                    }
138                            }
139                    }
140            }
141    
142            ul {
143                    foreach my $p ( @$sitemap ) {
144                            li {
145                                    full_url( $p );
146                                    children( $p );
147                            }
148                    }
149            }
150    
151    };
152    
153  =head1 REGIONS  =head1 REGIONS
154    
155  =head2 execute-sql  =head2 execute-sql

Legend:
Removed from v.171  
changed lines
  Added in v.172

  ViewVC Help
Powered by ViewVC 1.1.26