Access keys | Skip to primary navigation | Skip to secondary navigation | Skip to content | Skip to footer |
Problems viewing this site

Implementation advice

UDM4 Script

Starting with the 2.0 release of the CUE template, the primary navigation is implemented using the UDM 4.x script. This script was selected as being more accessible and having cleaner HTML markup than the code used in previous template releases.

The script is quite sophisticated and with that comes a certain amount of complexity. This page offers a gentle introduction. For further detail consult the extensive online documentation maintained by the script developer: http://www.udm4.com/manual/

The script utilises a number of files. A brief orientation follows.

udm-resources/ The udm-resources folder contains the files that support the primary navigation. The five files required in production can be found in the root of the folder.
udm-style.css The CSS styles for the primary navigation. NB: the majority of the styles should not be edited directly. Rather they are generated from a configuration file.
udm-custom.js A configuration file for the primary navigation. This file is used to generate the CSS in udm-style.css. NB: a commented version of this file is included in the udm-dev sub folder.
udm-control.js Provides script functionality. No need to edit.
udm-dom-lite.js Provides script functionality. No need to edit.
udm-mod-keyboard.js This file provides functionality for accessing the primary nav and the sub-menus using only the keyboard. F12 will activate the first menu item and the arrow keys are used to navigate the rest.
udm-resources/udm-dev/ The udm-dev folder contains additional files that will prove useful should you need to customise the default template script.
css-generator.html This page is used to generate new styles when you change udm-custom.js. When required, open the page in a browser and use the form to generate your new styles.
udm-custom-with-comments.js This is a more readable copy of the udm-custom.js configuration file. More detail concerning the configuration options is available at http://www.udm4.com/manual/customising/
udm-style.js CSS generating algorithms. Used by css-generator.html. No need to edit.
udm-dom.js In response to the CUE working group's request, the developer distributes the script in a number of versions. These trade functionality for kilobytes. This is the full (most feature rich and therefore heaviest) version.
udm-dom-ultra.js This is the lightest version of the script. NB: This version sacrifices keyboard support.
Last updated December