An easy to use menu, generating unordered lists (UL) for the best SEO.
This menu supports unlimited levels, you just have to add the extra behaviours to the stylesheet (css).
Things to be downloaded:
Put these files in a folder where you can easily find them (the document root for example).
Create a Snippet (Elements->Snippets) called 'menu'
Code to copy-paste in the Snippet:
Remember to adjust the path to the file if it is not in the document root.
Code to call the menu in your template:
<div class='dg_menu'> [ [!menu? &rootOffset=0 &baseURL='' &maxLevel=100]] </div>
NOTE: There is a blank space between the first two brackets to make it readable on this page. You need to remove this in your script.
You're ready to go!
&rootOffset = The page id that is used as the root for the menutree
&baseURL = The base URL if the root of the menu tree is not the root of the pagetree
&maxLevel = If you want to limit the depth of the menu, set this to the amount of levels that you would like to show
(for exmample: the second menu on the left starts in /code-corner with page id 16, so the menu is called with &rootOffset=16 &baseURL='code-corner/')