Submenu behaviour

It can be quite difficult to understand exactly how the three options MTMSubsGetPlus, MTMSubsAutoClose and MTMEmulateWE affect submenus. Not only do they control the behaviour but two of them also control display. Let's start out by looking at how the +/- signs work.

+/- signs

Only two of these variables control the +/- signs, MTMEmulateWE and MTMSubsGetPlus. The latter is rather obvious given the name of the option, but the former isn't, unless you know well what Windows Explorer looks like.

MTMSubsGetPlus has three different settings. The default setting is "Submenu" which means that a submenu will have a +/- sign next to it only when it contains other submenus. This website doesn't use that default behaviour, but the example site in the download files do. The other two settings are "Always" which the website uses and which makes all submenus have +/- signs regardless of whether they contain items or submenus, and "None" which turns them all off.

MTMEmulateWE also affects this setting. In Windows Explorer all folders that contain other folders have +/- signs next to them. There's one important difference between Windows Explorer and the menu: WE doesn't have a non-folder items. Since I see no reason to require site authors to only have submenus if they want to use this feature it means that all submenus will have the +/- sign, so in turn MTMSubsGetPlus is forced to "Always".

Expand & collapse

MTMSubsAutoClose controls how many submenus a user can have open at any given time. Set this to 'true' and the user can only have one open submenu on any level at any given time. If he/she opens another the first one will close. This can be very useful in those cases where the menu structure is very large and one wishes to limit how much the user can see so that he/she doesn't get confused.

Submenus linked to documents

When submenus link to documents things can start to become confusing. The behaviour of the menu will depend on whether MTMEmulateWE is set and also on what MTMSubsGetPlus is set to.

The default behaviour is to not emulate Windows Explorer. In this setup the behaviour of submenus differs depending on whether the submenu is collapsed or not. A collapsed submenu will load the document in the target frame and then expand. The user can click the +-sign (if present), the submenu's icon or the text and the behaviour will be the same.

If the submenu is expanded the behaviour is changed. The submenu's icon and the --sign (if present) will collapse the submenu. This is also reflected in the status bar where the message "Collapse foo" is shown, with 'foo' being the text of the submenu.

Should the user choose to click the item's text before collapsing the submenu it will simply load the document in the target frame. This enables the user to revisit the document of the submenu without having to close the submenu first, thereby making it possible to have a look at any documents contained by the submenu and then rereading the document of the submenu itself.

As mentioned the behaviour will depend slightly on the setting of MTMSubsGetPlus since the presence of the --sign is controlled by it. With no sign the user can only close a submenu by its icon.

When MTMEmulateWE is set to 'true' the behaviour changes. All items are given +/- signs and they can only be expanded/collapsed by using it. The item's text will only show the document in the target frame. This is equivalent to the behaviour of Windows Explorer in some Windows versions (Windows XP is one known exception).