Knowledge Base support case for AllWebMenus,  abstracted and stripped of all user’s private info.

Initial Email From:
Initial Email Subject: awmShowItem
Support Case Month: May 2013


I am back with the same technical problem I encountered in the Blog below:

You are saying in the blog response:

The “it7” is the ID of this specific item. It is NOT just its order in the menu. If you add other items before or after it, this item will still be referenced by “it7”.


In the AllWebMenus Help, I read a different explanation:

About the awmShowItem variable when the menu is populated using a "UL/LI structure". 

In order to find the correct ID to use as a parameter, you should count the loading order of the ULs and LIs. So you should count how many LI tags are found in the UL/LI structure until the desired item is found.
For example this is a usual UL/LI code:
<ul id="awmULLI-menu" style="display:none;">
<li>Main Item 1</li>
<li>Main Item 2
     <li>Sub Item 1</li>
     <li>Sub Item 2
         <li>Sub Item 4</li>
         <li>Sub Item 5</li>
         <li>Sub Item 6</li>
     <li>Sub Item 3</li>
<li>Main Item 3</li>

According to the awmShowItem technique, if you want to make the “Sub Item 6” highlighted, you should use it7 since its LI tag is the 7th LI in the structure


Testing the theory on the new project:  {URL REMOVED}

I am using the function var awmShowItem=["MainMenu,it5,1,0"];

IF I add another item in the BISHOP menu list, the highlighted menu option will move to the BISHOP group, since that option changed to it6.

The only solution to the problem is to create a javascript function where the selection of the menu item is based either on the URL or the anchor text:



Otherwise, I will have to go page by page to update the javascript code of similar pages, every time I add a new LI item into the structure.

Reply From: Likno Customer Support

Dear Claudio,

When you are using a menu project and you populate your menu in there, then each menu item gets a specific ID that will not change when you move this item around or add other items around it.

However, when you are using a UL/LI menu then the menu is dynamically created at runtime, so the menu items also get their ID at runtime and there is no way to have a specific item keep a specific id.

In this case, indeed, when you add items you may need to change the highlight code too.

However you say that you need to change this in every page. This suggests that you manually included the code in each of your pages in the first place. Our recommendation is that you use an include file (e.g. a PHP or ASP file) and keep the menu Linking Code, Structure Code and highlight code there. This way it will be automatically included in all pages, but it will be much easier to maintain as you will only need to change and upload a single file when you need to change the menu again.

Best Regards,
Likno Customer Support
Powerful javascript menus (CSS menus/drop-down menus/sliding menus), web trees, buttons, tabs, modals, tooltips, accordions, scrollers, designs for your websites!

Tags: , , , , ,