[[Wayfinder? &startId=`0` &level=`2` !]
<li class="active"> <a title="Images" href="/index.php?id=48">Image gallery</a> </li>
<li> <a title="About" href="/index.php?id=50">About</a> </li>
<ul id="menu1" class="menu noaccordion"> [+wf.wrapper+]</ul>
[[Wayfinder? &startId=`0` &level=`2` `&outerTpl=`outerTpl` &rowTpl=`rowTpl` ]]
[+wf.classes+] - where classes specifed will be inserted (includes class=" ")
[+wf.classnames+] - outputs the just the class names (without class=" ")
<li[+wf.id+][+wf.classes+]> <a href="[+wf.link+]" title="[+wf.title+]" [+wf.attributes+]>[+wf.linktext+]</a> [+wf.wrapper+] </li>
<ul id="menu3" class="menu [option]"> <li><a href="#">Some Title Here</a> <ul> <li><a href="http://www.pivotx.net/">PivotX</a></li> <li><a href="http://www.word.org/">Word</a></li> <li><a href="http://www.text.com/">Text</a></li> <li><a href="http://typo.org/">Typo</a></li> </ul> </li> .. .. and so on.
<ul id="menu" class="menu noaccordion"> [+wf.wrapper+] </ul>
[!Wayfinder? &startId=`0` &level=`2`&outerTpl=`outerTpl` !]
description: The innerTpl template is used as a wrapper for each submenu. If no innerTpl is specified the outerTpl is used in its place. Each item processed in the submenu will be inserted into the placeholder [+wf.wrapper+].In other words, when you set a custom outerTpl you need to set an innerTpl or else it will want to use the outerTpl for the inner.
function initMenus() {
$('ul.menu ul').hide();
$.each($('ul.menu'), function(){
$('#' + this.id + '.expandfirst ul:first').show();
});
$('ul.menu li a').click(
function() {
var checkElement = $(this).next();
var parent = this.parentNode.parentNode.id;
if($('#' + parent).hasClass('noaccordion')) {
$(this).next().slideToggle('normal');
return false;
}
if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
if($('#' + parent).hasClass('collapsible')) {
$('#' + parent + ' ul:visible').slideUp('normal');
}
return false;
}
if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
$('#' + parent + ' ul:visible').slideUp('normal');
checkElement.slideDown('normal');
return false;
}
}
);
}
$(document).ready(function() {initMenus();});