|
home / documentation / reference / hm_framesenabled
HM_FramesEnabled
- Description:
- Boolean value indicating whether or not the standard cross-frames
implementation is in use on this site.
- Value:
- Boolean (true or false), Integer (1=true,
0=false), or JavaScript expression that returns a boolean value.
- Applies To:
- Globally.
- Browser Compatibility:
- HM_FramesEnabled is supported in all browsers.
- Comments:
- When utilizing the standard cross-frames method on your site, the
full scripts and configuration files for the menus are all loaded in the
navigation page of the frameset. In this scenario, HM_FramesEnabled should
always be set to true. When utilizing the alternate cross-frames method,
the full scripts and configuration files are loaded in the individual content pages
in which they will be displayed. In that scenario, HM_FramesEnabled should
always be set to false. Therefore, setting HM_FramesEnabled to
true signals to HierMenus the fact that you have implemented HierMenus on
your framed site using the standard cross-frames method.
For further information pertaining to cross-frames implementations and differences
between the standard and alternate implementation methods, see the Cross Frames
section of the setup instructions.
HM_FramesEnabled 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_FramesEnabled
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_FramesEnabled looks a little cryptic:
if(typeof(window.HM_FramesEnabled)=="undefined")
HM_FramesEnabled = false;
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_FramesEnabled is not
already set, set it now." If you know that you will never be overridding HM_FramesEnabled
on any of your pages, then you can remove the if... line that precedes the
HM_FramesEnabled 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_FramesEnabled = true,
HM_FramesEnabled = 0,
HM_FramesEnabled = (window.thisPage=="cf")?1:0,
// if the user defined variable "thisPage" is "cf",
// HM_FramesEnabled is true
// Incorrect:
HM_FramesEnabled = "false", // quotes not allowed around booleans
HM_FramesEnabled = "0",
HM_FramesEnabled : 0,
// must use the "=" sign (not colon)
HM_FramesEnabled = '(window.thisPage=="cf")?1:0',
// no quoted expressions
- Default:
- false
- See Also:
-
HM_ScriptDir,
HM_ConfigDir,
HM_ConfigFiles,
HM_ConfigType,
HM_ImageDir
|