To create your own custom template, make a folder in your skin and place an XML manifest file in it called menudef.xml. The manifest should look something like this:
<?xml version="1.0" encoding="utf-8" ?>
<manifest>
<template>[MANIFEST]/Template.xslt</template>
<templateHead>[MANIFEST]/TemplateHead.txt</templateHead>
<scripts>
<script jsObject="jQuery" />
<script jsObject="jQuery.fn.treeview">jquery.treeview.min.js</script>
</scripts>
<stylesheets>
<stylesheet>jquery.treeview.css</stylesheet>
</stylesheets>
<defaultTemplateArguments>
<templateArgument name="collapsed" value="1" />
</defaultClientOptions>
<defaultClientOptions>
<clientOption name="persist" type="string" value="cookie" />
<clientOption name="unique" type="boolean" value="true" />
<clientOption name="animated" type="number" value="100" />
</defaultClientOptions>
</manifest>
Only the <template> element is required, all others are optional. The elements are interpreted as follows:
- template: The path of the XSLT file to transform the menu XML with. (Alternatively, by popular request, you can provide a Snapsis template here, but the Snapsis parser is not thoroughly tested).
- templateHead: The path of a text file to insert in the <head> of the page.
- script: The path of a JavaScript file to import. If the jsObject attribute is specified, the script will only be imported if the specified JavaScript object does not exist. Also, if jsObject is either jQuery or jQuery.ui and no script path is specified then the menu will automatically load Google's hosted version of jQuery or jQuery UI.
- stylesheet: The path of a CSS stylesheet to import into the page.
- templateArgument: An argument to be passed into the XSL stylesheet.
- clientOptions: A set of name/value pairs to be passed into the style sheet as a JavaScript object. The type attribute of the clientOption element can be string, number or boolean.