4 |
4 |
<div id='html-menu'>
|
5 |
5 |
[% INCLUDE sections %]
|
6 |
6 |
</div>
|
|
7 |
<script type='text/javascript'>
|
|
8 |
$(function(){
|
|
9 |
$('#html-menu div.menu-submenu').hide();
|
|
10 |
$('#html-menu div.menu').each(function() {
|
|
11 |
$(this).click(function(){
|
|
12 |
$('#html-menu div.menu-submenu').not('#' + $(this).attr('id') + '_submenu').hide();
|
|
13 |
$('#' + $(this).attr('id') + '_submenu').toggle();
|
|
14 |
});
|
|
15 |
});
|
|
16 |
});
|
|
17 |
</script>
|
7 |
18 |
</body>
|
8 |
19 |
</html>
|
9 |
20 |
[%- BLOCK sections %]
|
10 |
21 |
[%- FOREACH item IN sections %]
|
11 |
22 |
<div class='menu-multiline'>
|
12 |
23 |
[% SET menuouterloopcount = loop.count %]
|
13 |
|
[%- FOREACH chunk IN item.chunks %]
|
14 |
|
<div id='menuitem[% menulevel %]_[% menuouterloopcount %]' class='menuitem [% item.class %] hover'>[% PROCESS item %]</div>
|
15 |
|
[%- END %]
|
|
24 |
<div id='menuitem[% menulevel %]_[% menuouterloopcount %]' class='menuitem [% item.class %] hover'>
|
|
25 |
[%- FOREACH chunk IN item.chunks %]
|
|
26 |
<div class='menuitemchunk hover'>[% PROCESS item %]</div>
|
|
27 |
[%- END %]
|
|
28 |
</div>
|
16 |
29 |
[%- IF item.subitems.size %]
|
17 |
30 |
<div id='menuitem[% menulevel %]_[% loop.count %]_submenu' class='menu-submenu[% menulevel %]'>
|
18 |
|
[% INCLUDE sections sections=item.subitems, menulevel='_'+loop.count %]
|
|
31 |
[% INCLUDE sections sections=item.subitems, menulevel= menulevel _ '_' _ loop.count %]
|
19 |
32 |
</div>
|
20 |
33 |
[%- END %]
|
21 |
34 |
</div>
|
... | ... | |
24 |
37 |
[%- BLOCK item %]
|
25 |
38 |
[% item.spacer %]
|
26 |
39 |
[%- IF item.href %]
|
27 |
|
[% L.link(item.href, L.html_tag('span', L.html_tag('img', undef, item.img), class='menu-spacer') _ chunk, target=item.target) %]
|
|
40 |
[% L.link(item.href, L.html_tag('span', L.img_tag(item.img), class='menu-spacer') _ chunk, class='menu-link', target=item.target) %]
|
28 |
41 |
[%- ELSE %]
|
29 |
|
[% L.html_tag('img', undef, item.img) _ chunk %]
|
|
42 |
[% L.img_tag(item.img) _ chunk %]
|
30 |
43 |
[%- END %]
|
31 |
44 |
[%- END %]
|
32 |
|
|
33 |
|
</body>
|
34 |
|
|
35 |
|
<script type='text/javascript'>
|
36 |
|
$(function(){
|
37 |
|
$('#html-menu div.menu-submenu').hide();
|
38 |
|
$('#html-menu div.menu, #html-menu div.submenu').each(function() {
|
39 |
|
$(this).click(function(){
|
40 |
|
$('#html-menu div.menu-submenu').not('#' + $(this).attr('id') + '_submenu').hide();
|
41 |
|
$('#' + $(this).attr('id') + '_submenu').toggle();
|
42 |
|
});
|
43 |
|
});
|
44 |
|
});
|
45 |
|
</script>
|
46 |
|
|
47 |
|
</html>
|
Menü gefixt und richtig gestyled