|
HierMenus 4/5 Array Conversion Tool
Follow the steps below to convert your existing HierMenus 4/5 configuration
(menu arrays) to the new HierMenus 6 configuration format.
Locate and copy all of your existing global variable settings (HM_GL_xxx)
and paste them into the box below. In most HierMenus implementations, the global
variable settings are located in your current HM_Loader.js file. Since you
cannot continue to use your existing HM_Loader.js file with HierMenus 6,
and since most default parameter settings are now included within the HierMenus 6
configuration file, you must copy and paste in your current global settings so that
the conversion tool can properly apply them.
If you currently commonly use page specific variables on your pages
(HM_PG_xxx), you should include them in the box below, as well
(beneath the global variable settings). Note that in a great many (most, in fact)
version 4/5 implementations that use page specific variables, the variables themselves
are misused. Page specific variables should be included only on exception
pages; that is, pages that somehow differ from the default menu displays
on the rest of your site. If you are using page specific variables on every page of
your site, then you are doing no more than what you could do by simply assigning
global parameter settings within your existing HM_Loader.js file.
The conversion tool will produce a file suitable for global use
on your site. Therefore, if you use the same set of page specific variables on
every page of your site, then you should copy them into the box below. If, on the
other hand, you use page specific variables to simply differentiate a few pages
on your site, then you should not include those page specific variables
in the box below; rather, you must instead convert these page specific variable
settings individually via the advanced topic Page Specific Parameter Settings
in the setup instructions.
Copy and paste the contents of your existing HM_Arrays.js file into the
box below, beneath your global and (optional) page specific parameter settings.
Special care must be taken in the processing of JavaScript expressions. In order
for the conversion script to work properly, all JavaScript expressions that
you use in your parameter or menu array settings must be quoted. Therefore, you
must add enclosing quotes to any JavaScript expression that you specify that does not
already have enclosing quotes. For example, if your original assignments look like this:
HM_GL_MenuWidth = myWidth1;
HM_Array1=[[(window.AltCalc=="assigned")?myWidth2:myWidth1,,,],
...
then your new setting will look like this:
HM_GL_MenuWidth = "myWidth1";
HM_Array1=[['(window.AltCalc=="assigned")?myWidth2:myWidth1',,,],
...
Note that the second expression (the one within the menu array) already contained quotes
within it, and we therefore used single quotes on the outside of the expression when we
added our own. Similarly, if the expression already contains single quotes, use double
quotes on the outside.
When the conversion is completed, you will then need to go back through the resulting
file and double check your JavaScript expressions to ensure they are or are not quoted
as per your needs. The conversion script will, unfortunately, be unable to distinguish
between an intended JavaScript expression and a normal string, and will therefore leave
all JavaScript expressions in quotes when it produces its converted output. In HierMenus
version 6, the only parameters that accept JavaScript expressions within quotes are
TopMenuX,
TopMenuY,
ChildMenuX,
ChildMenuY,
TopUponDisplay,
TopUponHide,
ChildUponDisplay, and
ChildUponHide.
Click the "Perform Conversion" button to generate your HierMenus 6 configuration
file. The resulting file will appear in a new page, along with any further instructions
if and when necessary.
Contact us if you have any problems with the conversion routine.
|