We are providing HierMenus to you at no cost. HierMenus code requires a confirmed membership with internet.com. Please register by clicking here and come back soon to download your free copy of HeirMenus code.
Click Here to Register

Site Navigation
Bulletins
About
Documentation
FAQ
Samples
Known Issues
Technology Jobs

internet.commerce

Partner With Us














          
internet.com

IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

 
HierMenusCentral Enhance the Functionality of Your Web Site with DHTML HierMenus.
    

home / documentation / reference / hm_configtype

HM_ConfigType

Description:
The type of the configuration file specified with HM_ConfigFiles.

Value:
One of default or arrays, or any JavaScript expression that returns one of those values.

Applies To:
Globally.

Browser Compatibility:
HM_ConfigType is supported in all browsers.

Comments:
Though not recommended, you can use HierMenus version 4/5 style menu arrays (HM_Array1=[... etc.) with HierMenus version 6. To do so, you specify the name of the array file itself as the HM_ConfigFiles value (as well as the directory location of that file in HM_ConfigDir) and then specify HM_ConfigType as arrays; i.e.,
HM_ConfigType="arrays";
Using version 4/5 array structures is not recommended for HierMenus 6, for two main reasons.

  • It is less efficient. When HM_ConfigType is set to arrays, HierMenus must load not only the arrays themselves, but an additional script HM_ConvertArrays.js that dynamically translates the array structure into the standard configuration format. The additional script download and translation time are both unnecessary for configuration files that exist in the native HierMenus version 6 format. The translation time, in particular, will need to be applied to every page of your site that includes menu displays. (The download time is not so critical, since typically after the first download of the scripts subsequent downloads will be retrieved from the browser cache.) While this translation time is very fast, it nonetheless is additional unnecessary time that can delay the initial display of your page or menus.

  • It will not support newer features. Many of the new parameters available in HierMenus version 6 were not available in the version 4/5 arrays, and you therefore will not be able to utilize them; at least, not without adding your own customizations to HM_ConvertArrays.js. While you're welcome to do so, we will not support such additional customizations.

If you do elect to use your old arrays, be sure that the HM_ConvertArrays.js script is available in the HierMenus scripts directory (the directory specified by HM_ScriptDir). See the Advanced Options section of the setup instructions for further details.

HM_ConfigType is a global variable that is set in the HM_Loader.js file. It is not set in the configuration file as other configuration parameters are, which explains why it is set using a standard JavaScript assignment statement (via the = sign). The reason for this is because HierMenus needs to know the value of HM_ConfigType before the configuration files themselves are loaded. See the examples below.

In the HM_Loader.js file, you may note that the default setting for HM_ConfigType looks a little cryptic:

if(typeof(window.HM_ConfigType)=="undefined")
	HM_ConfigType = "default";
Though admittedly verbose, setting the parameter in this manner (with the if... logic on the line just prior to the setting of the actual parameter) allows you to override this setting on a page by page basis if you should choose to do so at a later time. i.e., The logic above basically says "if HM_ConfigType is not already set, set it now." If you know that you will never be overridding HM_ConfigType on any of your pages, then you can remove the if... line that precedes the HM_ConfigType setting. We recommend, however, that you leave it as is so that you can take advantage of the feature at a later time if need be.

Examples:
// Ok:
HM_ConfigType = "default",
HM_ConfigType = "arrays",
HM_ConfigType = (HM_NS4)?"arrays":"default",
    // if browser is Netscape 4.x, use arrays
    // otherwise use default

// Incorrect:
HM_ConfigType = default,
    // strings must be quoted
HM_ConfigType : "arrays",
    // must use = sign (not colon)
HM_ConfigType = '(HM_NS4)?"arrays":"default"',
    // no quoted expressions
Default:
"default"

See Also:
HM_ScriptDir, HM_ConfigDir, HM_ConfigFiles, HM_FramesEnabled, HM_ImageDir

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

Created: 3/25/2004
Updated: 3/25/2004
URL: http://www.hiermenuscentral.com/documentation/reference/hm_configtype.html