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 |