October 18th, 2012AWM: Menu source path adjustment
Knowledge Base support case for AllWebMenus, abstracted and stripped of all user’s private info.
Initial Email From: Raúl
Initial Email Subject: Problem with AllWebMenus
Support Case Month: October 2012
Hello
I use AllWebMenus 5 (user: {INFO REMOVED}) and I have a menu running ok.
The directory structure is:
c:\RGB\menu.js
c:\RGB\awmdata
C:\RGB\awmdata\menu
The file C:\RGB\index.html use this menu to go to diferent html
C:\RGB\contacto.html
C:\RGB\supplies.html
...
I need also to use this menu from the file C:\RGB\galeria\index.html
I have try to copy menu.js to gmenu.js (to use in this new file) and modify this file but the
menu appear in the web but don't run the link.
I need help
Please, is very important for me.
Thanks in advance.
Raúl
Reply From: Likno Customer Support
Dear Raul,
You should not copy the menu in multiple places. Instead, you only need to adjust the Linking Code.
In your page you have a Linking Code that looks something like this:
<!-- ******** BEGIN ALLWEBMENUS CODE FOR menu ******** -->
<script type="text/javascript">var MenuLinkedBy="AllWebMenus [4]",awmMenuName="menu",awmBN="GN";awmAltUrl="";</script>
<script charset="UTF-8" src="menu.js" type="text/javascript"></script>
<script type="text/javascript">awmBuildMenu();</script>
<!-- ******** END ALLWEBMENUS CODE FOR menu ******** -->
In order to fix the problem, all you need to do is to make sure the “src” path is correct for all pages. For example you could change it to:
src="/RGB/menu.js"
This way, it will work regardless of how deep your folders are.
Regards,
Kostas
Likno Customer Support
www.likno.com
Create any type of javascript menu (CSS menu, drop-down menu, sliding menu), button, html tree, modal window, tooltip, accordion, tab, scroller, jQuery slider) or design for your websites!
Reply From: Raúl
Thanks.
In the menu.js I have line like this:
it=s0.addItemWithImages(1,2,2,"Contacto",n,n,"",n,n,n,3,3,3,n,n,n,"contacto.html",n,n,n,"contacto.html",n,142,30,2,0,0,0,n, n,n,0,0,0,0,0,n,n,n,0,0,0,2,n);
where I point to a html file. But when I use the index file more deep this link don't run. I have try to write
it=s0.addItemWithImages(1,2,2,"Contacto",n,n,"",n,n,n,3,3,3,n,n,n,"contacto.html",n,n,n,"../contacto.html",n,142,30,2,0,0,0,n, n,n,0,0,0,0,0,n,n,n,0,0,0,2,n);
but continue with the same problem.
Regards,
Raúl
Reply From: Likno Customer Support
Dear Raul,
As I suggested with the “src” issue, the same applies to the links. If your links do not work in inner folders, then you need to make them “root relative”.
So you should not change them to “../contacto.html”, but to “/RGB/contacto.html”, or when you move the site online if “contacto” is a page in the root folder “/contacto.html”.
Regards,
Kostas
Likno Customer Support
www.likno.com
Create any type of javascript menu (CSS menu, drop-down menu, sliding menu), button, html tree, modal window, tooltip, accordion, tab, scroller, jQuery slider) or design for your websites!
Tags: css menu, directory, directory structure, drop-down menu, javascript menu, jquery, link, Menu, page, path, relative path, root folder, site, sliding menu, source, src, website