Line # Revision Author
1 3 ahitrov@rambler.ru <%ARGS>
2
3 $menu => 1
4
5 </%ARGS>
6 <%INIT>
7
8 use vars qw($keeper);
9
10 my $MENU = [];
11 my $root = Contenido::Section->new($keeper,1);
12
13 my @childs = $root->childs();
14 for (0..$#childs)
15 {
16 my $cid = $childs[$_];
17 my $child = Contenido::Section->new($keeper,$cid);
18 if ($child->menu_A && ($menu == 1))
19 {
20 push (@{ $MENU }, $child);
21 };
22 if ($child->menu_B && ($menu == 2))
23 {
24 push (@{ $MENU }, $child);
25 };
26 }
27
28 return $MENU;
29
30 </%INIT>